|
-
October 24th, 2008, 06:34 AM
#1
Read performance
I am using the following code to test the performance of reading of data (1000 records)
using (IDataReader reader = database.ExecuteReader(command))
{
while (reader.Read())
{
LogManager.LogInformation(DateTime.Now.Millisecond.ToString("000"));
}
}
When I inspect the logfile that is written to, I see that every second record read takes 15ms-16ms of execution time.
...
24.10.2008 13:08:36 : #1033 [unknown] 515
24.10.2008 13:08:36 : #1034 [unknown] 515
24.10.2008 13:08:36 : #1035 [unknown] 530
24.10.2008 13:08:36 : #1036 [unknown] 530
24.10.2008 13:08:36 : #1037 [unknown] 546
24.10.2008 13:08:36 : #1038 [unknown] 546
24.10.2008 13:08:36 : #1039 [unknown] 562
24.10.2008 13:08:36 : #1040 [unknown] 562
...
I thought looping through the datareader should be very fast. Are there something I could do to speed things up?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|