Subject Re: [firebird-support] Re: how work an index..
Author German Aracil Boned
Ann W. Harrison wrote:

>At 05:39 PM 11/29/2004, GrumpyRain wrote:
>
>
>
>
>> You are right that Firebird indexes are
>>one directional. My understanding is that this is to minimize the size
>>of the index. The only drawback I can see is that the index can't help
>>with a reverse sort, but you can always add a descending index if you
>>need that functionality.
>>
>>
>
>Actually, no, indexes are one-directional because that is
>the necessary precondition for non-deadlocking internal
>structures. Indexes are dynamic multi-user structures
>that can - and do - change while they are in use. As long
>as everyone takes locks in the same order, everything works.
>If I have a lock on page 15, I can ask for handoff to page
>16, knowing that the request won't cause a deadlock. Since
>I have a lock on page 15 and page 15 points to page 16, I
>can be sure that page 16 will still be valid after the
>handoff.
>
>Regards,
>
>
thank and Best Regards Ann