Subject Re: Indexes in Firebird
Author Adam
--- In firebird-support@yahoogroups.com, "Meena" <iyermeena@...> wrote:
>
> The difference is that when i give the order by clause of a field
from the master table, the output comes ordered by that specific field
and the index of the transaction table is not considered at all.If I
remove the order by clause of the master table field, the index of the
transaction field is effective.

----

It sounds like it is doing an indexed walk through the master table.
You can avoid that by adding 0 to the field, or appending '' if it is
a string.

eg

...
ORDER BY ID+0

...
ORDER BY NAME || ''


Adam