http://qs321.pair.com?node_id=30082


in reply to MS SQL Server

I'm also wondering if there is a performance hit with using ODBC as opposed to connecting to the database directly.

It is very likely for a small performance hit of using the ODBC. Due to the overhead function calls of DBI -> DBD::ODBC -> ODBC -> MSSQL. But I don't see the reason for a large performance hit.

Actually I don't see any reason not to use ODBC. Even if it is Microsoft technology but MSSQL and ODBC agree with each other, why shouldn't they... both are Microsoft.

JanneVee

Replies are listed 'Best First'.
RE: Re: MS SQL Server
by Jouke (Curate) on Aug 29, 2000 at 12:20 UTC
    I think there IS a real performance problem when you use ODBC instead of a native driver. ODBC is slow. I've never seen a fast ODBC connection.
    Unfortunately I've never seen a native SQL Server driver for DBI. I once had to write some Perl to SQL Server, and we used ADO.pm (I believe Matt Sergeant wrote that one). It worked very well (and faster than DBI::ODBC), but that wasn't what you would want, since it wasn't a DBD-driver.
    There IS a DBI::ADO driver available though, but I've never used it. It's at least faster than ODBC.

    Jouke
      I always have considered ODBC as a low level API to databases. The slowness that I experienced was by the "blocking" API calls. i.e. poorly written code....

      By using ADO you get some performance enhancements, even if the ADO connection goes through OLE DB and that goes through ODBC.

      One performance enhancement I can think of is Persistant connections. That is a thing you've wont get with a native MSSQL driver!

      Janne