Subject | Re: Index Selectivity |
---|---|
Author | Svein Erling |
Post date | 2003-12-08T14:35:27Z |
--- In firebird-support@yahoogroups.com, Tim Ledgerwood wrote:
index can be useful even when it has lots of duplicates (e.g. Arno's
example of a Boolean column), and in such situations it is good to add
the PK to the end of the index.
Set
- I support Firebird, I am a FirebirdSQL Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
> At 12:07 PM 08/12/2003 +0000, you wrote:Sure, that would normally be the best option. Though occationally an
>
> >Tim,
> >since some of your indexes contain quite a few duplicates, it may
> >be wise to add the PK to the end of these indexes. E.g. rather than
> >having
> >
> >CREATE INDEX IDX_LOGSTOCK ON LOG(STOCK)
> >
> >do
> >
> >CREATE INDEX IDX_LOGSTOCK ON LOG(STOCK, ID)
>
> Shouldn't I rather just delete the indexes?
index can be useful even when it has lots of duplicates (e.g. Arno's
example of a Boolean column), and in such situations it is good to add
the PK to the end of the index.
Set
- I support Firebird, I am a FirebirdSQL Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation