Sunday, February 24, 2019

TempDB performance checklist in SQL Server
Tempdb in SQL server

============
EMPDB performance is critical to SQL Server performance.  There are different uses for the SQL Server TEMPDB , and it's important to document the planned SQL activity.  I've seen many SQL Server Instances performance increase just by optimizing the TEMPDB
When thinking and planning TEMPDB  configuration  consider  TempDB purpose and how to maximise TEMPDB.
Different Uses of TEMPDB
User objects e.g tables, indices, table variables. Scope (user session or routine)
Internal objects  .e.g join work files Scope (statement)
Version Stores  to support row versioning
SQL Server Objects Using TEMPDB
Cursors
Databse Mail
DBCC CHECKDB
Index Rebuild with SORT_IN_TEMPDB
Queries
Temp tables
UDF
Version Store
Tactics for Optimizing TEMPDB
1) Create an IO profile of TEMPDB . Understand workload requirements.
2) Placement of TEMPDB .Locate the TEMPDB on a separate disk  to user databases
How to find the tcp port number on SQL Server ?

SELECT
suser_sname() as username
,local_tcp_port
,session_id
,connect_time
,net_transport
,protocol_type
,encrypt_option
,auth_scheme
,last_read
,last_write
FROM   sys.dm_exec_connections