the point regarding the new hardware is a good one.
Well, I hope you’ll find a way to solve it. Good luck. MS SQL is not on my rader that much, but I’ll be reading your blog.
kind regards,
Roland
]]>To be honest, we are not certain how the code ran on SQL2000 so well. It is a view of a view, I believe, so we took a shotgun approach and recompiled all views and did an update of stats using fullscan.
I do believe the optimizer in sql2005 has been rewritten, and this is not the first time i have seen query performance degrade between versions. I am willing to bet that if more developers were benchmarking their queries they would find that performance has suffered.
The real reason that people seem to be blind by this situation is that when they upgrade to new systems they typically get newer hardware as well as a server that is not as bloated. So, if your old query ran in five seconds, but on the new server it runs in four, chances are you would not think there is a problem. but if you dived into some benchmarks with regards to physical and logical I/O, chances are the performance degradation would be visible.
But if the end user is simply pressing a button on a web page, they actually believe that performance has gotten better. and who are we to argue with a happy customer?
]]>wow – this sounds like a nightmare…
I am no expert in MS SQL, but it seems a bit odd that old code slows down so bad in a newer version.
I can imagine this happening if extensive use has been made of hints (not sure of MS SQL has those), or if the newer version changed default indexing algorithm and nothing was explicitly specified in table DDL (which seems pretty unlikely)
I’d be very interested to hear it if you find out more about the cause.
]]>