Subject Re: [ib-support] Record Count
Author Ann W. Harrison
At 05:23 PM 11/7/2001 -0600, Woody wrote:
>From: "Ann W. Harrison" <aharrison@...>
> >
> > As for the index, though it will help in other
> > databases, Firebird and InterBase can not use an index to accellerate
> > a count.
>
>Not even when using a WHERE clause? Are you sure? I would have thought that
>as long as some criteria were specified which could use an index, then it
>would use one.

Yes, it will use indexes if there is a where clause on the select
statement and the optimizer thinks that indexes would help. Sorry -
what I meant to say is that many other databases can count the rows
in a table by counting the leaf-level index entries in the primary
key index. We can't.


Regards,

Ann
www.ibphoenix.com
We have answers.