I have a huge query on my SQL Server 2005 server. It needs to be run once every day, but when this query works, temp db grows from 2 to 48 GB. What is the best way to optimize or find the reason tempdb grows when this query adds / updates 80K records with (~ 120 columns) in one table?
What should I do on this request that tempdb will not grow?
Any suggestions would be appreciated.
Note: There are no variables or table variables or CTEs in this query. just a bunch
INSERT INTO ... with MULTITABLE JOINS with SUBQueries...
source
share