Subject re Subject: Efficient Record Count
Author Gary Mathews
Might it not be an idea (depending on how important the speed is, and how
critical the information is) to use two generators for this. One is fired
before insert(which increments generator A), and the other after delete
(increments generator B). The difference between the two would be the record
count. (of course, you will have to be careful of transaction issues because
the genetrators are not part of the transaction, and so dont get rolled

> Date: Thu, 13 Dec 2001 17:21:56 -0900
> From: "dkLists" <dklists@...>
>Subject: Efficient Record Count
>All -
> I have a large table with approximately 1 million rows that will be
continually growing over time. It is useful to >be able to review the
recordcount whenever I run my app and add/delete data. I've been trying to
come up with >an efficient way to maintain a 'running' record count without
loading the entire dataset to the client, i.e. >autofetchall.
>Would it be much faster to do this in a stored procedure? If so, would it
be as simple as doing a SELECT >COUNT(*) FROM TABLE? If not, is there a
particular IBObjects component that should be used?
>All advice welcome.
>Thanks in advance.
>GreatLand Technology