February 24, 2009 at 2:41 am
Hi dba,
I have a query which is referencing to a view. Some parameters are causing my query to hang and keeping my tempdb to grow to large size (some parameters does not). Any advise where to start checking.
Also how to check which part of the query is using tempdb the most?
February 24, 2009 at 5:50 am
To really answer the question, we'd need to see the query, but tempdb is used when you create temporary tables, either table variables or old fashioned temp tables, when you sort values, when the query creates hash tables or table spools... There are more. To know what your query is doing, you need to look at the code for things like the temporary table or ORDER BY statements, or the execution plan for things like hash tables & table spools.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply