Kamis, 25 Februari 2016

Query: Penyebab Besarnya TempDB SQL Server

These operations heavily use tempdb:
  • Repeated create and drop of temporary tables (local or global).
  • Table variables that use tempdb for storage purposes.
  • Work tables associated with CURSORS.
  • Work tables associated with an ORDER BY clause.
  • Work tables associated with an GROUP BY clause.
  • Work files associated with HASH PLANS.
Heavy and significant use of these activities may lead to the contention problems.

Query untuk mengurangi :



use tempdb
go
dbcc DROPCLEANBUFFERS
dbcc FREEPROCCACHE
dbcc FREESYSTEMCACHE('ALL');
dbcc FREESESSIONCACHE;
go
dbcc SHRINKFILE(TEMPDEV,20480);
go
 

Letak Folder Tempdb


C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA

Tidak ada komentar:

Posting Komentar