Subject Re: [firebird-support] Can long duplicate chains cause crash?
Author Helen Borrie
At 07:31 PM 16/08/2004 +0000, you wrote:

>I just discovered this morning that one of the developers had created
>an index on a field with about 50 values on a table that for some
>customers, has 10's of millions of records. In the test database I
>use (5.2GB), the longest duplicate chain had over five million
>entries.
>
>I've seen posts talking about the dangers of long duplicate chains,
>and bugs in this area with older versions.

Long duplicate chains kill performance in searches but I'm not aware of any
bugs relating to them, with older or newer versions. The problem is a
question of index geometry and it hasn't gone away.

>This problem is in a
>program version whose customers are using InterBase 5.6. Is it
>possible that database corruption could result from these chains
>being so large?

No. Just thousands and thousands of index pages with many levels of
indirection. If the majority of actual nodes are concentrated in just a few
of the values, then the length of those chains becomes a problem for
performance. If the nodes are evenly spread across the 50 values, the
index might actually be useful.

If performance has died as a result of adding this index, do something
about it. If it's not causing a problem, don't worry about it.

Your question (see Subject) was whether long dup chains cause
crashes. Yes, they can, if their usage exhausts memory resources. But
you'd observe progressive performance degradation before that.

/heLen