Problem Statement: Script to find top 10 high memory consuming Queries. Solution: SELECT TOP 10 Object_name(qt.objectid) AS ‘SP Name’, Substring(qt.text, ( qs.statement_start_offset / 2 ) + 1, ( ( CASE qs.statement_end_offset WHEN -1 THEN Datalength(qt.text) ELSE qs.statement_end_offset END[…]
Read moreCategory: Performance Tuning
SQL Server Tuning: Quick overview of SQL Server performance using Activity Monitor
Question:How to get a quick overview of SQL Server performance. Ans: Use activity monitor in SSMS to get the quick[…]
Read moreSQL Server Tuning: Find Slow running queries using the Reports in SSMS
Find Slow running queries using the Reports in SSMS 1) High CPU consuming Queries: To run the report right click[…]
Read moreSQL Server Tuning : Top 10 CPU Intensive Queries
Problem Statement: Script to find top 10 CPU intensive queries. Solution: SELECT TOP 10 Object_name(qt.objectid) AS ‘SP Name’, Substring(qt.text, ( qs.statement_start_offset / 2 ) + 1, ( ( CASE qs.statement_end_offset WHEN –1 THEN Datalength(qt.text) ELSE qs.statement_end_offset END – qs.statement_start_offset ) / 2 ) + 1)[…]
Read moreSQL Server Tuning – De-fragment Indexes
Problem Statement: Script to generate the scripts used to de-fragment indexes. Solution: Use this script to find the fragmented indexes and following script[…]
Read moreSQL Server Tuning – Find Fragmented Indexes
Problem Statement: Script to find fragmented Indexes. Solution: No need to explain how killing fragmented indexes could be.Use following script to[…]
Read moreSQL Server Tuning – Find Duplicate Stats
Problem Statement: Script to find the duplicate stats. Solution: SQL server allows to create duplicate statistics but having duplicate statistics are overkill[…]
Read more