Delphi with SQL Server: OLEDB vs. Native Client drivers

前端 未结 8 2475
花落未央
花落未央 2021-02-09 16:13

I have been told that SQL Native Client is supposed to be faster than the OLEDB drivers. So I put together a utility to do a load-test between the two - and am getting

8条回答
  •  迷失自我
    2021-02-09 17:07

    1. In your question you are mxing OLE and SQL Native Client. Probably you are mean few things in the same time:

      • OLE -> OLEDB, which is obsolescent generic data access technology;
      • OLE -> "SQL Server OLEDB Provider", which is SQL Server 2000 OLEDB provider;
      • SQL Server Native Client, which is SQL Server 2005 and higher client software. And it includes as OLEDB provider, as ODBC driver.
    2. If to talk about OLEDB providers and supported SQL Server versions, then:

      • "SQL Server OLEDB Provider" (SQLOLEDB) supports SQL Server 2000 protocol;
      • "SQL Server Native Client 9" (SQLNCLI) supports SQL Server 2000 and 2005 protocols;
      • "SQL Server Native Client 10" supports SQL Server 2000, 2005 and 2008 protocols.

      You did not sayd what SQL Server version you are using. In general, best is to use SQL Server OLEDB provider corresponding to your SQL Server version. Otherwise you can run into incompatibility between server and client versions.

    3. Abstractly comparing, I can only speculate about differences between SQLNCLI and SQLOLEDB:

      • One is more correctly uses server protocol;
      • One is using more advanced protocol features;
      • One performs more processing, what heps to handle more situations;
      • One uses more generic / optimized data represenation.

      Without correct benchmark application and environment it is hard to accept your comparision results, because they may depend on multiple factors.

提交回复
热议问题