News for hackers. Stuff that matters.
Re:Dapper.NET - "micro-ORM" that poweres StackOverflow goes ... by d4nt on Tuesday April 05, 2011 @09:13AM (#2410762)
I notice this is using data readers. I'm not an expert but I believe they keep the connection (and therefore any database locks) until you've finished processing and closed the reader. Given that it's for hydrating strongly typed collections into memory you aren't going to be ignoring any records. You might get even better throughput at the database (at the expense of memory usage in the app) by using datasets which will run the query, then close the connection, then return all the results to the app.
Re:Dapper.NET - "micro-ORM" that poweres StackOverflow goes ... by mquander on Tuesday April 05, 2011 @09:50AM (#2410894)
I strongly disagree. If you use a DataAdapter to populate a dataset, all it's doing is iterating over a reader internally and loading the results into the dataset. There's no reason it would ever be as fast, let alone faster, than using a reader yourself to populate a data structure that you actually want.
Re:Dapper.NET - "micro-ORM" that poweres StackOverflow goes ... by SigmundA on Tuesday April 05, 2011 @10:39AM (#2411112)
Locks really shouldn't be happening with a datareader on a modern database with MVCC isolation (SQL2005+ and Oracle, etc.) unless you have specifically lowered isolation.