Subject Re: SELECT BETWEEN VERY SLOW
Author ml600f
Thank you for your answer,

i run the same test with MSSQL and look to the queryplan.
MSSQL does it like i expect, it use the index range of the combined index and skips all that isnĀ“t needed. It is allways rather quick.
Even a real range where ID BETWEEN 1 AND 3 is allways quick (few msec).
My App works many years with very good performance on MS SQL. Only on firebird i see this problem.
Many people say firebird is rather quick. In this case it is not.
I have switched a customers database from MSSQL to Firebird and at bigger reports the application seems to hang. (After minutes it comes back with the correct results). It was not possible to work with it.
Switched back the same code and the same database to MS-SQL Server and the same calculation needs only a few seconds.
With my improvement with = instead of BETWEEN or adding seperate indices it works even on firebird. Not so smooth but ok.
Maybe Firebird 3.0 does better optimizations.

Martin