Subject Re: how do i speed this up?
Author Adam
--- In, "martinknappe" <martin@...>
> Ok, thank I really have a problem
> What I *could* of course do is only create my 1-field index on asterm
> and then instead of writing
> "order by asterm ascending, id ascending"
> write
> "order by asterm"
> but the problem I'm having with this approach is the following:
> what happens when there are 2 or more records with the same value for
> asterm?

You can make no assumptions about the order of those records. Two or
more records with the same asterm value will be returned in an
arbitrary order that may change between one version of Firebird and
the next, or even when an index statistics are recalculated and
another plan is then used.

So yes, you are in a bit of a pickle there, you have reached a
limitation of Firebird 1.5. Firebird 2 increases this maximum index
size to 25% of the page size, but that is not a huge help today.