Big request increases TempDB

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...
+3
source share
2 answers

Not seeing the exact code is hard for you to help. But the question seems to need optimization.

, db 48 , , , , , .

+1

this. , , , .

, , , TempDB. / , , TempDB.

+1

Source: https://habr.com/ru/post/1724666/


All Articles