Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Could nested loops cause the growth in tempdb?


Could nested loops cause the growth in tempdb?

Author
Message
Golfer22
Golfer22
SSC Journeyman
SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)

Group: General Forum Members
Points: 96 Visits: 96
I believe hash joins can cause growth in the tempdb if there is insufficient memory. I don't think nested loops do.
Bhuvnesh
Bhuvnesh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2928 Visits: 4076
If you go with the basic structure of HASH join then you will find that temp table get created (either in memory or tempdb) which might the cause of tempdb's growth. so now why i mentioned here "either in memory or tempdb" because if data doesnt get fit in memory then it will be moved to tempdb. same happens in case of temp table and table variable storage too(its a myth that table varable get created in memory and temp table in tempdb).

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8247 Visits: 14368
Golfer22 (1/1/2013)
I believe hash joins can cause growth in the tempdb if there is insufficient memory. I don't think nested loops do.

No, I do not think nested loops would affect tempdb.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8247 Visits: 14368
Bhuvnesh (1/2/2013)
If you go with the basic structure of HASH join then you will find that temp table get created (either in memory or tempdb) which might the cause of tempdb's growth. so now why i mentioned here "either in memory or tempdb" because if data doesnt get fit in memory then it will be moved to tempdb. same happens in case of temp table and table variable storage too(its a myth that table varable get created in memory and temp table in tempdb).

I think you meant internal work table, aka the hash table. Temp table implies we could address it using #tableName. Internal work tables are created by the database engine to solve a particular query and are not directly addressable by us.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search