Hi,
We recently identified a performance issue with a long running query (usually around 9 seconds using an existing, different index) which is improved with the addition of a new non-clustered index.
The new index has recently been applied to the primary database and performance improved to around 1-2 seconds. This index has also been applied to our replicated database (which has exactly the same schema, data and indexes for the table as the primary database in this case) but it is not using this new index, rather the existing, different index.
All indexes on our replicated database are applied manually rather than automatically.
We know it's using the existing, different index from looking at actual execution plans.
We've updated statistics for the table but still no improvement.
When we initially applied the index to the primary database table we ran an sp_recompile on the table, but this was a step we'd added due to previous slow running stored procs after an upgrade. That is the only difference we can think of between the
steps we've taken in creating the index and can't see why that would make a difference if we updated the statistics for the table anyway.
Can anyone offer any other checks or steps we could take to get queries to use the index (without using hints)?
Thanks
Chris