I noticed that we have many indexes that start with a specific column, and this column has low power (i.e. the company and 99% of the records belong to a "live" company).
Therefore, these indexes are next to the useless ones (from what I read), since they do not provide a means for dividing the data in the table, which will be found quickly.
So, I want to run a script that will find me all the indexes in the database, where it indexes the first column, for example, a column called "ROW_COMPANY".
I have tried various patterns and stuff, but I am not getting the correct results (ie too many rows, rows that contain indexes that do not start with "ROW_COMPANY").
You really appreciate!
source
share