Individual index or composite

  • I inherited this database, which is also a production database , has a table with index created on individual columns and also there is composite key covering the same indexes.

    Which one should I keep the composite, which is over the key1, key2 or individual, which is over the key1?

    Also key2 is PK and has non-clustered index on it.

  • We can't answer the question if we don't know the columns and the queries that use the table.

    If I where you, I would let a trace running to capture all the queries accessing that table. and then run all of them to check the execution plan SQL server uses, and verify wich index it is used.

    Maybe SQL uses both and the DBA that created the index knew it.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply