Subject Re: [firebird-support] How to make my report quicker
Author Arno Brinkman
Hi All,

> Yes, Alexander, it should be able to combine these two indexes to
> provide better performance than using the primary key alone. I have read
> (not tried, I find indexes on single fields simpler to understand and
> rarely use compound indexes) that having compound indexes are slightly
> faster than single indexes, so to get the last inch of performance out
> of a critical query it sounds sensible to try.

When the optimizer chooses to combine two indexes instead of using 1 compound index then the engine
must scan two indexes (which mostly means more index page reads). If one of those single fields has
many duplicates the compound index will certainly be better (less index page reads).

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info