Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Darrell67
Starting Member
2 Posts |
Posted - 2011-07-16 : 06:25:36
|
HiI am having trouble with a new view I am writing which joins two existing views (both of which are multi tabled). Either SQL (2005 Enterprise) gives a timed out msg or I end up aborting the query after 5 mins or more.The strange thing is both Views can be individually executed in less than than a second.If I repeat the above on my laptop running 2008 R2 express the new view will complete in 2 seconds, yet the quad core xeon server can't do it in 5 mins!?The number of rows aren't vast, the final output is 227 rows from starting out as 200,000 rows in one of the tables.I am sure the query is not at fault and even if it is not written optiumally the server should be at least on par with my laptop.The server is running fine, as other queries (large) are all running fine. Any thoughts?ThanksDarrell |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-16 : 12:55:27
|
Try OPTION (maxdop=1)at the end of your query statement. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Darrell67
Starting Member
2 Posts |
Posted - 2011-07-16 : 18:09:51
|
Thank for the suggestion WebfredTried Option (maxdop 1) and (maxdop 2)Unfortunatly it made no difference. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|