Subject Re: [firebird-support] Re: Natural plan on indexed column
Author Ivan Prenosil
> Beside this weird effect, one can apparently always make
> Firebird use an index together with count(*) (at least,
> if you have a primary key): Just replace
>
> select count(*) from requests; /* natural */
>
> by
>
> select count(*) from requests
> where id>0; /* primary key index */

But it does not make sense to use index to select all rows.
The first select will read whole requests table,
the second select will also read whole requests table plus index,
so the second select should be slower.

Ivan
http://www.volny.cz/iprenosil/interbase/