indexes - cleanup

Sam 1,476 Reputation points
2024-06-19T05:10:52.2333333+00:00

Hi All,

Need some suggestions on how to disable or drop some of the unused indexes?

Regards,

Sam

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,997 questions
{count} votes

Accepted answer
  1. Erland Sommarskog 112.7K Reputation points MVP
    2024-06-19T21:51:09.5133333+00:00

    Your whole approach seems wrong to me. If there is an app team that has db_ddladmin and can create indexes, then you as as the DBA cannot go bezeerk and drop indexes like crazy. You need to work together with the app team, at least if it is in your organisation. (You mentioned that it is a vendor database, so if the app team is working for the vendor, it gets a little more complicated.)

    Dropping unused indexed is unlikely to save that much space, although it is a good idea to check for redundant indexes, particularly on large tables.

    If the database is growing like you describe, you need to make sure that there is disk enough. With the data in your other post, it seems that in 2-3 weeks you will have filled up the disk and the system will come to a standstill. To avoid a standstill, you need to act now. You can spend one day or two with trying to understand from where all that growth is coming from (and as I said, you need to work with the app team). But at some point, you need to get a sign-off from management to move to a bigger VM.


1 additional answer

Sort by: Most helpful
  1. Olaf Helper 45,106 Reputation points
    2024-06-19T05:53:25.1566667+00:00

    How do you define "unused indexes"?

    Primary keys may be "unused", but defines business logic = uniqueness of data.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.