A long time ago I downloaded an ABL program that would scan your database schema and identify indexes (Indices?) that were redundant.
I have been unable to locate this and wonder if anyone has something that does this.
proutil command with idxcheck qualifier?
What do you mean by a redundant index? Is it one that's not used, or one that is rendered redundant due to other indexes that already exist? Or some other rule?
I define a redundant index as one whose fields are already present in another index with the same leading components.
A typical example:
Index2 is redundant
> I define a redundant index as one whose fields are already present in another index with the same leading components.
Then you're going to break a selection of the multiple indexes.
That's a very good point about multiple index use. I had not considered this and we'll have to be careful before removing these indexes.
> Then you're going to break a selection of the multiple indexes.
Can you elaborate on that George? I failed to see the problem here.
> Can you elaborate on that George?
For example, if in addition to the indexes mentioned above there is Index3 on the SaleDep field then the query:
for each Sale where SaleDate eq "..." and SaleDep eq "..."
will use the two indexes: Index2 and Index3
But only if Index2 exists. Otherwise the query will use only one index (either Index1 or Index3 - depending from ...)