Category Archives: Advanced SQL

How to identify unused indexes in SQL Server

We can use dynamic management view “sys.dm_db_index_usage_stats” to identify unused indexes on SQL Server. DMV – sys.dm_db_index_usage_stats This DMV shows you how many times the index was used for user queries. SELECT OBJECT_NAME(S.[OBJECT_ID]) AS [OBJECT NAME],        I.[NAME] AS [INDEX … Continue reading

Posted in Advanced SQL | Tagged , , | Leave a comment

How to Enable multiple SQL agent Jobs using single SQL Query

Here is the SQL query to Enable multiple SQL Agents Jobs. exec sp_configure ‘allow updates’,1 go reconfigure with override go update msdb.dbo.sysjobs set [enabled] = 1 where name like ‘Ownership Standardization%’ go exec sp_configure ‘allow updates’,0 go reconfigure with override … Continue reading

Posted in Advanced SQL | Tagged , , , | Leave a comment

How query revision can impact query Performance

When we see any query, performing badly. Our first reaction to improve query performance is to check hardware and network resources for any issue. If hardware and network resources are correct. Then we go for index tuning to improve query … Continue reading

Posted in Advanced SQL | Tagged , , , , , | Leave a comment