Subject Re: [ib-support] view on a table to speed up queries
Author Helen Borrie
At 04:41 PM 22-04-02 +0200, you wrote:
>ups, the question is simply what is low-selectivity? The distribution of
>values?

Exactly right. The effect of an index of very low selectivity (like
logtype on its own) is to cause it to build very long chains of duplicates,
making for great depth and proliferation of index pages that have to be
searched.


>On Mon, 2002-04-22 at 16:34, Jan Agermose wrote:
>
> just to be sure. What is meant by low-selectivity and does it change
> (logtype, id) to (id, logtype). id being the primary key

No, FB/IB don't change indexes. Use (logtype, id) because, otherwise, you
might as well not use an index on logtype at all. (You could test that,
too...simply drop the index...it *might* be faster). Stranger things have
been known. :-)

--- H

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________