Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
runnerpaul
Starting Member
24 Posts |
Posted - 2012-07-25 : 07:41:53
|
If TempDB fills up when queries are run that have joins in them does this data get released/removed when the query completes?I ran a query but killed it because I noticed my C:\ was filling up. My TempDB is held here so I thought if I killed the query the data in TEMPDB might get removed and my space issue will be resolved.Killing the query did stop C:\ from filling up further but no space has become available on the drive.Does anybody have any ideas on this?CheersPaul |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-07-25 : 07:45:49
|
If it is temp tables that are created or the space is used for sorting and suchlike then it will be released when the query ends or the connection terminates.Tempdb will not shrink automatically but will be recreated next time sql server is restarted.You shoould think about the initial size though as it is not a good idea to leave it to grow every time.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
runnerpaul
Starting Member
24 Posts |
Posted - 2012-07-25 : 09:14:25
|
It is restricted but the mdl and 7 ndl files are restricted to 25GB. Seems pretty big for a 45GB drive.However, maybe TempDB isn't the issue. Something used up 11GB on the C:\ between 9 and 12 this morning but I'm not sure what. I only suspect this as those files are pretty large and were last updated just after 11.30. I don't know what size they were earlier today though so cant say if they have grown.I can't see any other files that are large enough to be the cause. |
|
|
|
|
|