Deleting unused indexes – SQL Server

It’s a good practice to periodically check usage of indexes in case they are not really used by users. We must be aware some indexes cost to maintain and affects our database performance when inserting data.

The following query allows you to identify those indexes which are not used (no user seeks, scans nor lookups) but requires effort to database to maintain because it has user_updates registered:

First column provides you the sentence for deleting those unused indexes.

In case you are strict on space usage, you could delete user_updates>0 clause and delete all unused indexes.

Hope it helps!

Further information at:
https://www.mssqltips.com/sqlservertutorial/256/discovering-unused-indexes/

Tags: ,

No comments yet.

Leave a Reply

Deleting unused indexes – SQL Server

It’s a good practice to periodically check usage of indexes in case they are not really used by users. We must be aware some indexes cost to maintain and affects our database performance when inserting data.

The following query allows you to identify those indexes which are not used (no user seeks, scans nor lookups) but requires effort to database to maintain because it has user_updates registered:

First column provides you the sentence for deleting those unused indexes.

In case you are strict on space usage, you could delete user_updates>0 clause and delete all unused indexes.

Hope it helps!

Further information at:
https://www.mssqltips.com/sqlservertutorial/256/discovering-unused-indexes/

No comments yet.

Leave a Reply

Deleting unused indexes – SQL Server

It’s a good practice to periodically check usage of indexes in case they are not really used by users. We must be aware some indexes cost to maintain and affects our database performance when inserting data.

The following query allows you to identify those indexes which are not used (no user seeks, scans nor lookups) but requires effort to database to maintain because it has user_updates registered:

First column provides you the sentence for deleting those unused indexes.

In case you are strict on space usage, you could delete user_updates>0 clause and delete all unused indexes.

Hope it helps!

Further information at:
https://www.mssqltips.com/sqlservertutorial/256/discovering-unused-indexes/

No comments yet.

Leave a Reply