Wednesday, November 17, 2004

Few more interesting facts about fastest way of pulling data from database.

Few more interesting facts:

The fact is that DataReader is much faster then DataSet , as following results show:
DataReader

DataReader requires for execute
Time No of Rows

====================
0.9612 10 Rows
.1982 50 Rows
1.4234 100 Rows
3.5585 500 Rows

Where as DataSet requires for execute

Time No of Rows
================
1.0979 10 Rows
1.3435 50 Rows
1.6516 100 Rows
4.2164 500 Rows

On average a datareader is 16% faster then dataset.

If we compare the SqlDataReader and OleDbDataReader, the result is as below
No of Rows SqlDataReader OleDbDataReader
============================================
10 Rows 0.9612 1.6592
50 Rows 1.1982 2.2088
100 Rows 1.4234 2.8741
500 Rows 3.5585 8.6055
On average SQLDataReader is 115% faster then OleDbDataReader.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home