Subject | Re: [firebird-support] Creating a compound index |
---|---|
Author | Ann W. Harrison |
Post date | 2004-10-11T21:57:25Z |
At 05:23 PM 10/11/2004, tractaylor wrote:
the engine will not walk three indexes to emulate a sort -
for reasons you can imagine, that's not efficient. But you
don't need indexes to produce sorted results - or even to
produce sorted results quickly. Except in the case where you
select a huge number of records and throw out all but the
first few, sorting often as fast or faster than retrieving
records in index order.
Regards,
Ann
>I am curious if I can create a compound index with one fieldYou can't. As suggested, you can create three indexes, but
>ascending and the other descenging.
the engine will not walk three indexes to emulate a sort -
for reasons you can imagine, that's not efficient. But you
don't need indexes to produce sorted results - or even to
produce sorted results quickly. Except in the case where you
select a huge number of records and throw out all but the
first few, sorting often as fast or faster than retrieving
records in index order.
Regards,
Ann