3 ms·
I completely agree. Unless the database is doing something odd (ok, not out of the question I guess) like ignoring an index on the id column, it just doesn't s
by mrduncan 17y ago
I completely agree. Unless the database is doing something odd (ok, not out of the question I guess) like ignoring an index on the id column, it just doesn't seem logical that performing 48 more queries would be faster than allowing the database engine to run it all at once.
- logicalmind 17y agoThere are so many levels to the performance that measuring the surface and making a generalization is practically useless. I find the comments on the article even more baffling. Here are a couple relevant questions: 1. What is the scope of the data context used for these queries? Caching that is keyed by id is done within the scope of the data context: http://blogs.msdn.com/dinesh.kulkarni/archive/2008/07/01/linq-to-sql-tips-9-understanding-datacontext-s-internal-caching.aspx http://blogs.msdn.com/dinesh.kulkarni/archive/2008/07/01/lin... 2. Is the code being run co-located with the database server? If so, this is atypical and these times do not include network overhead. There are many more questions...