Sql-server – Can a un-used NONCLUSTERED INDEX still enhance query speed

database-designindex-tuningnonclustered-indexsql serversql-server-2016

This is a strange situation, but I'm hoping someone has an answer.

During some performance troubleshooting, we added a NONCLUSTERED INDEX to a table, as was requested by sp_BlitzIndex. We checked its usage the next day, and it showed 0 reads (0 scans/seeks, 0 singleton lookups), so we disabled it.

The very next minute, we get a complaint of the same app-slowness (performance trouble) that we were trying to check out & resolve in the first place when we added the INDEX.

Now, I know in theory, this sounds purely coincidental. The INDEX was provably, measurably, NOT USED. Disabling it SHOULD NOT have caused query performance degradation. But it's almost TOO coincidental.

Question

So my question, simply enough, is thus:

Is it at all possible, that a NONCLUSTERED INDEX, whose usage-stats (from the DMVs / sp_BlitzIndex) show NO usage, still have been helping query performance somehow on the affected table?

Best Answer

Yes it could, when SQL Server decides that the statistics from that index is more accurate/useful and uses that stats to do the estimates and come up with a plan.

I have come across situations when SQL Server has decided to use stats from one index and scan/seek another index.

Edit - This might not be applicable cause I just realized that you have disabled the index. I have not tested that scenario.