Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Totally out of my depth
Message
 
To
06/04/2011 12:42:55
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01506238
Message ID:
01506344
Views:
30
>>>>>This monstrous query is very hard to read and impossible to understand. Can you break it to managable pieces using either CTE or temp tables?
>>>>
>>>>Hi Naomi - as I said my TSql is very limited - don't know what CTE is and how would temp tables help ? - thanks
>>>
>>>Hi Pete
>>>
>>>if I was attempting to improve the performance of the query I'd first remove all the sub queries in it. See how the basic query performs and how it can be improved . then run the sub queries on their own and do the same for them then put it all back together.
>>
>>Hi Nicholas, if I remove the sub queries the performance improves dramatically but I don't know of a way to bolt the sub queries back on in an efficient manner ?
>
>Are you viewing the queries in the Query Optimizer?

I'm viewing the queries in management studio ( right click on sp / modify ) where is the query optimiser ( I'm on 2005 ) ?
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform