mo.notono.us

Monday, April 11, 2005

ADO.NET Performance Test: Getting a Single Value

John Papa conducted a performance test on getting a single value from a database: "it turns out that ExecuteScalar test ran slightly faster than the output parameter test, and much faster than the DataSet test".

This is surprising - I always had thought - based on reading - that NonQuery was faster than Scalar. Guess I was wrong.

1 Comments:

  • I found it this somewhat odd, too. I am running some more tests, increasing size, running them different ways, using straight SQL instead of procs, etc .... just to see if anything changes. So far, the results are consistent though. But the times for ExecuteScalar and the output parm from ExecuteNonQuery are about the same, really.

    By Anonymous John Papa, at Monday, April 11, 2005 1:13:00 PM  

Post a Comment

Links to this post:

Create a Link

<< Home