[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Odbc, OleDb and SqlClient performance

Teodorico Morell

3/21/2002 11:24:00 PM

I have just finished some testing using these three methods with MS SQL
Server 2000.
I'm accessing the Northwind database and reading all the records on the
orders table.
My results are the following (In milliseconds):


Run No. OleDb Odbc SqlClient
====================================
1 310.4464 150.216 460.6624
2 220.3168 140.2016 290.4176
3 220.3168 140.2016 290.4176
4 10.0144 10.0144 10.0144

The first three runs where made by closing and starting the application.
The fourth run, was using the connection cached (Without closing the app)

The SqlClient results called my attention since is has the lowest values,
when it is supposed to be optimized to access MS SQL Server.
As always, OBDC is faster than OleDb provider. Comparing ODBC vs. OleDb, I
had similar results with Visual Basic 6.0.



2 Answers

Hemanshu Shah

3/22/2002 10:16:00 PM

0

Thanks for the statistics.

"Teodorico Morell" <morellt@cantv.net> wrote in message
news:uzqoSzS0BHA.2488@tkmsftngp02...
> I have just finished some testing using these three methods with MS SQL
> Server 2000.
> I'm accessing the Northwind database and reading all the records on the
> orders table.
> My results are the following (In milliseconds):
>
>
> Run No. OleDb Odbc SqlClient
> ====================================
> 1 310.4464 150.216 460.6624
> 2 220.3168 140.2016 290.4176
> 3 220.3168 140.2016 290.4176
> 4 10.0144 10.0144 10.0144
>
> The first three runs where made by closing and starting the application.
> The fourth run, was using the connection cached (Without closing the app)
>
> The SqlClient results called my attention since is has the lowest values,
> when it is supposed to be optimized to access MS SQL Server.
> As always, OBDC is faster than OleDb provider. Comparing ODBC vs. OleDb, I
> had similar results with Visual Basic 6.0.
>
>
>


Daniel Reyes

3/23/2002 3:36:00 AM

0

Iv'e done a similar test on the Northwind Orders table, the results below
are in milliseconds.

The test was run in a console application, with 3 loops running 10 times for
ODBC, OLEDB, and SQL. The first set of results is creating a dataset, 2nd
set of results is creating a data reader. The default settings for each
provider was used.

With DataSet
======================
Running ODBC TEST
Run: 0 Execution Time:630.9072
Run: 1 Execution Time:150.216
Run: 2 Execution Time:170.2448
Run: 3 Execution Time:150.216
Run: 4 Execution Time:160.2304
Run: 5 Execution Time:150.216
Run: 6 Execution Time:150.216
Run: 7 Execution Time:150.216
Run: 8 Execution Time:150.216
Run: 9 Execution Time:160.2304

Running OLEDB TEST
Run: 0 Execution Time:310.4464
Run: 1 Execution Time:80.1152
Run: 2 Execution Time:150.216
Run: 3 Execution Time:80.1152
Run: 4 Execution Time:80.1152
Run: 5 Execution Time:100.144
Run: 6 Execution Time:80.1152
Run: 7 Execution Time:80.1152
Run: 8 Execution Time:80.1152
Run: 9 Execution Time:90.1296

Running SQL TEST
Run: 0 Execution Time:400.576
Run: 1 Execution Time:60.0864
Run: 2 Execution Time:50.072
Run: 3 Execution Time:60.0864
Run: 4 Execution Time:60.0864
Run: 5 Execution Time:100.144
Run: 6 Execution Time:50.072
Run: 7 Execution Time:60.0864
Run: 8 Execution Time:60.0864
Run: 9 Execution Time:60.0864

With DataReader
=====================
Running ODBC TEST
Run: 0 Execution Time:230.3312
Run: 1 Execution Time:30.0432
Run: 2 Execution Time:30.0432
Run: 3 Execution Time:30.0432
Run: 4 Execution Time:30.0432
Run: 5 Execution Time:20.0288
Run: 6 Execution Time:30.0432
Run: 7 Execution Time:30.0432
Run: 8 Execution Time:20.0288
Run: 9 Execution Time:30.0432

Running OLEDB TEST
Run: 0 Execution Time:200.288
Run: 1 Execution Time:20.0288
Run: 2 Execution Time:10.0144
Run: 3 Execution Time:0
Run: 4 Execution Time:10.0144
Run: 5 Execution Time:0
Run: 6 Execution Time:0
Run: 7 Execution Time:0
Run: 8 Execution Time:10.0144
Run: 9 Execution Time:10.0144

Running SQL TEST
Run: 0 Execution Time:310.4464
Run: 1 Execution Time:0
Run: 2 Execution Time:0
Run: 3 Execution Time:10.0144
Run: 4 Execution Time:0
Run: 5 Execution Time:10.0144
Run: 6 Execution Time:10.0144
Run: 7 Execution Time:10.0144
Run: 8 Execution Time:10.0144
Run: 9 Execution Time:0

With these results, ODBC is definately the slowest.


"Teodorico Morell" <morellt@cantv.net> wrote in message
news:uzqoSzS0BHA.2488@tkmsftngp02...
> I have just finished some testing using these three methods with MS SQL
> Server 2000.
> I'm accessing the Northwind database and reading all the records on the
> orders table.
> My results are the following (In milliseconds):
>
>
> Run No. OleDb Odbc SqlClient
> ====================================
> 1 310.4464 150.216 460.6624
> 2 220.3168 140.2016 290.4176
> 3 220.3168 140.2016 290.4176
> 4 10.0144 10.0144 10.0144
>
> The first three runs where made by closing and starting the application.
> The fourth run, was using the connection cached (Without closing the app)
>
> The SqlClient results called my attention since is has the lowest values,
> when it is supposed to be optimized to access MS SQL Server.
> As always, OBDC is faster than OleDb provider. Comparing ODBC vs. OleDb, I
> had similar results with Visual Basic 6.0.
>
>
>