Tuesday, March 20, 2012

Query Evaluvation and tempdb

Dear All,
Does SQL server store the intermediate results set in the tempdb? One of the
team members has dropped the indexes for our one large table. I was running
a
query that has multiple joins (including this table) , and this caused tempd
b
to fill up.
According to this article by Microsoft,
http://msdn2.microsoft.com/en-us/library/ms190768.aspx, I'm under impression
that table scan has stored a large set of intermediate data in tempdb, whic
h
caused it to fill up.
My team members seem to argue that temp db is only used when we use temp
tables.
Secondly, does sql server evaluate the join first, or where clause first?
(Or it depends on each query?)
Thank you much for your help in advance.> My team members seem to argue that temp db is only used when we use temp
> tables.
Your team members are wrong. Tempdb can be used for sorting on just about
any type of query. Also see a list of items here under "Causes":
http://www.aspfaq.com/2446
A

No comments:

Post a Comment