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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard

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

    Can someone give me some insight in what type
    of connection is the fastest to connect to SQL Server.

    Thx in Advance


  • Marc Gravell

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

    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

    Comment

    • Richard

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

      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 connectionstrin g 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.gravell@g mail.comwrote in message
      news:%23zhaAWas IHA.3632@TK2MSF TNGP04.phx.gbl. ..
      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

      Comment

      • Ignacio Machin ( .NET/ C# MVP )

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

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

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

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

        Comment

        Working...