J
John A Grandy
I have coded a data-access class in which is encapsulated all code which
makes calls ADO.NET via System.Data.SqlClient ( SqlDataAdapter.Fill() ,
SqlCommand.ExecuteReader() , etc. )
All public methods of these classes are thread safe.
My data-access class has a single private SqlConnection.
In my WinForms app, I always utilize a singleton to obtain a reference to
the single global instance of my data-access class , and therefore all app
code is talking to the databases via the same SqlConnection instance.
My app performs a fair amount of background processing which is
multi-threaded. So, all threads talk to the databases via a single
SqlConnection.
So far, I have encountered no performance problems , however I have only
tested with a handful of background processing tasks running simultaneously.
Potentially, there could be 100 threads running simultaneously.
Here are my questions :
Is a single SqlConnection sufficient for my scalability needs ?
Does ADO.NET implement any "under the hood magic" that would provide good
scalability for my single SqlConnection architecture ? e.g. a load
balanced connection pool within ADO.NET
Is there a 1:1 correspondence between my .NET SqlConnection instance and
ADO.NET's lower-level connection to my Sql Server database ?
Any other relevant information most appreciated.
Thank-you.
makes calls ADO.NET via System.Data.SqlClient ( SqlDataAdapter.Fill() ,
SqlCommand.ExecuteReader() , etc. )
All public methods of these classes are thread safe.
My data-access class has a single private SqlConnection.
In my WinForms app, I always utilize a singleton to obtain a reference to
the single global instance of my data-access class , and therefore all app
code is talking to the databases via the same SqlConnection instance.
My app performs a fair amount of background processing which is
multi-threaded. So, all threads talk to the databases via a single
SqlConnection.
So far, I have encountered no performance problems , however I have only
tested with a handful of background processing tasks running simultaneously.
Potentially, there could be 100 threads running simultaneously.
Here are my questions :
Is a single SqlConnection sufficient for my scalability needs ?
Does ADO.NET implement any "under the hood magic" that would provide good
scalability for my single SqlConnection architecture ? e.g. a load
balanced connection pool within ADO.NET
Is there a 1:1 correspondence between my .NET SqlConnection instance and
ADO.NET's lower-level connection to my Sql Server database ?
Any other relevant information most appreciated.
Thank-you.