Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What type connection is the fastest in C# to SQL Server

3 views
Skip to first unread message

Richard

unread,
May 9, 2008, 2:27:42 AM5/9/08
to
Can someone give me some insight in what type
of connection is the fastest to connect to SQL Server.

Thx in Advance


Marc Gravell

unread,
May 9, 2008, 3:22:54 AM5/9/08
to
In which way? If you mean topology, then a local SQL Server will
obviously be a lot quicker than a LAN or WAN server... and talking "TDS"
will be a lot quicker than using http services (which I really don't
recommend anyway). But SqlConnection will worry about this for you.

In terms of "connect" speed - then a pooled connection will have less
initial latency than a non-pooled connection - but again, SqlConnection
will worry about this for you.

In terms of data-access, well - that is a large topic... "read less
data" and "use suitable indexes" being the short version.

Did you have something specific in mind?

Marc

Richard

unread,
May 9, 2008, 5:16:06 AM5/9/08
to
Thx for your answer and to give me a bit more insight.

I am going to read a bit more about pooled connections en how

SqlConnection controls it for me.

It obvious that a lot of the speed depends on data access and

correct indexes, thx for the reminder :)

Basicly my colleage asked me to check the difference between connections

like an connectionstring or ado.net connection. He was a little vage about

it's for a simpel program that do uses a lot of data all the time, that's
way

Thx again

"Marc Gravell" <marc.g...@gmail.com> wrote in message
news:%23zhaAWa...@TK2MSFTNGP04.phx.gbl...

Ignacio Machin ( .NET/ C# MVP )

unread,
May 9, 2008, 3:22:13 PM5/9/08
to

> Basicly my colleage asked me to check the difference between connections
>
> like an connectionstring or ado.net connection. He was a little vage about


Now you lost me, ConnectionString is a property of the ADO.NET
Connection object.

Just use it , and if you find any problem then you worry yourself :)

0 new messages