Subject | Re: [firebird-support] Re: Natural plan on indexed column |
---|---|
Author | Ivan Prenosil |
Post date | 2006-03-29T16:16:46Z |
> Beside this weird effect, one can apparently always makeBut it does not make sense to use index to select all rows.
> 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 */
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/