Subject Re: [firebird-support] Indexing for Min and Max
Hi Artur,

Thanks for the reply - I'll probably just do the [ugly] SQL I mentioned
rather than bother with an extra table. It gives pretty good performance.



"Artur Anjos" <artur@...> on 10/10/2003 02:27:49 PM

Please respond to

To: <>
Subject: Re: [firebird-support] Indexing for Min and Max

Hi David,

> Is there a way to get count(id) to use the primary key / an index? What
> am trying to do here is actually get the count of records very fast - I
> have up to a million records in there.

count(*) will make the engine do something more than counting, so you will
have always this delay. (Look in IBPhoenix for more information about this,
spesial focus on deleted records).

If you need this info very often, may I suggest to create a table with this
info, and update this table with triggers after insert / after delete on
your big table. This will solve your speed problems.


To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to