|Subject||Re: [ib-support] SELECT Order by DESC|
|Author||Ann W. Harrison|
>"Szakály Balázs" <szakalyb@...>At 12:41 PM 5/20/2002 +0100, Jason Chapman (JAC2) wrote:
> > Why cannot use FB any index on select with desc order?
> > So, i need to create 2 indexes to all table, where i need desc order
> > with high response time.
>My guess is that indexed values are compressed based on the prior indexJason is right, but compression is only half the problem. Originally,
>value, therefore you have to traverse them in a forward direction
the index pages at each level pointed only to the next node to the right
(and of course, down for higher level nodes). That made navigating an
index backward nearly impossible. Left pointers were added to allow
automatic rebalancing after deletes, but navigation to the left is
complicated and expensive. To prevent internal deadlocks, only threads
traversing the index to the right can do lock handoffs. A thread going
left must be prepared to restablish itself from the top of the index
each time it attempts to move left one block in the index.
We have answers.