Subject | Re: [firebird-support] Re: Primary key not used in SELECT |
---|---|
Author | Helen Borrie |
Post date | 2008-04-03T14:14:41Z |
At 10:47 PM 3/04/2008, you wrote:
The order of the *index segments* is important, more or less, depending on Firebird ODS version and whether statistics are a reasonable reflection of the index state. Prior to Fb 2, an index worked more efficiently with the most selective segments "last" (rightmost) in the index structure.
With Fb 2+, *provided* you keep statistics reasonably up-to-date, selectivity is maintained separately per segment and I believe the optimiser "knows" to take this into account when choosing (or not choosing) an index. I don't think it can be taken as a "silver bullet" for curing bad indexes or avoiding housework, in any case; if anything, it just makes it possible to mitigate the inherent evils.
./heLen
>Related to this issue ./heLen, the table field order can affect thisTable field order? No, I don't see how. The engine knows the position of a table column (its degree). It doesn't have to jump across a row structure for anything.
>issue ?
The order of the *index segments* is important, more or less, depending on Firebird ODS version and whether statistics are a reasonable reflection of the index state. Prior to Fb 2, an index worked more efficiently with the most selective segments "last" (rightmost) in the index structure.
With Fb 2+, *provided* you keep statistics reasonably up-to-date, selectivity is maintained separately per segment and I believe the optimiser "knows" to take this into account when choosing (or not choosing) an index. I don't think it can be taken as a "silver bullet" for curing bad indexes or avoiding housework, in any case; if anything, it just makes it possible to mitigate the inherent evils.
./heLen