February 2, 2007 at 2:56 pm
Hey guys..
I have a view that we use here that takes about 4-6 minutes to return all rows in three of our environments, however in our dev environment it runs forever..insanely long.
Now the both boxes are 2-way boxes, Dev has half the RAM of the other environments, and Dev is direct attached as opposed to a SAN. I have compared settings, and restored all the pertinent DBs from PRD down to the DEV box..and still..Never finishes..
So, I look at the execution plan for the View create on both PRD and DEV and they are very different..with the main difference being Hardware.. I am lost, I can't imagine SQL would care about the hardware when creating the execution plan.. Any ideas?
February 2, 2007 at 3:37 pm
I would say run the code in Profiler in both boxes and compare executing time and do the same thing with Management Studio/Query Analyzer and click on show execution cost I think you will see the difference. That said Views are Query rewrites but persisted so I don't think you can compare its execution plan retention to a stored proc which are just compiled. The SQL Server team created a blog to help with query performance tuning. Hope this helps.
http://blogs.msdn.com/sqlqueryprocessing/archive/2006/09/26/771411.aspx
Kind regards,
Gift Peddie
February 2, 2007 at 3:53 pm
It may also help if you post the execution plans or at least tell us what the differences are.
February 4, 2007 at 5:09 pm
Another couple o' things to check...
And, yes... memory makes a huge difference. If your Dev box only has half the memory, your view could be using it all and not leaving much room for anything else.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 5, 2007 at 8:04 am
Thanks all.. I should have taken a closer look at the versions (both Enterprise) however the dev box was missing a hotfix. After I installed it, the plans matched up (the main difference was the last step prehotfix was a compute scalar step(100%) and no parallelism in previous steps... now its on par with the other environments.. and returns in under 3 minutes! Sorry for wasting everyone's time!!
Thanks... Rich
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy