Showing posts with label Tips to minimise TempDB utilisation in Microsoft SQL Server. Show all posts
Showing posts with label Tips to minimise TempDB utilisation in Microsoft SQL Server. Show all posts

Tuesday, April 11, 2023

Tips to minimise TempDB utilisation in Microsoft SQL Server

 

As we aware, Tempdb is very important system database which is used to store temporary data. Various database operations require temporary space during sorting, grouping, and joining.

Few tips are given below to minimise TempDB utilisation:

1. Optimise queries before releasing on server: The size of temporary data in TempDB will increase if the query is written poorly. So optimise your query properly before releasing on the server.

2. Avoid Using Cursors: Cursor works on row by row and one row at a time.  Avoid using cursors in your code block or SP to avoid this issue.
 
3. Data type also plays important role.  Use the data type of column properly.

4. Store Data and Log Files on different drives to get better Read-Write performance.

5. Size of tempdb: Keep close eye on TempDB size & add more space if needed. 

Featured Post

DBCC CLONEDATABASE: A Comprehensive Guide

The DBCC CLONEDATABASE command emerges as a formidable tool for administrators and developers in the field of database administration. The d...

Popular Posts