Subject Re: [firebird-support] union and order by
Author Thomas Steinmaurer
>> select fieldA, fieldB from table1
>> where (fieldA starting with 'bd'
>> or fieldA starting with 'bi')
>> and fieldA between 'bd' and 'bj')
>> order by fieldA asc, fieldC asc
>>
>> Thanks, will try that out and report back.
>> I started to use the union instead of the OR when we
>> were still on Interbase and the difference in speed then was enormous. We then
>> moved to Firebird and the difference was still there.
>> Note that we are still on Firebird 1.5 if that makes a difference.
>
> Could be, because the V2 series offers a lot of improvements in the
> optimizer area.
>
> If possible, I would seriously try that with Firebird 2.5.

... needless to say, after migrating the database with a backup/restore
cycle to pump the ODS to the newest version.


--
With regards,
Thomas Steinmaurer
http://www.upscene.com/