Subject | re Subject: Efficient Record Count |
---|---|
Author | Gary Mathews |
Post date | 2001-12-15T07:39:41Z |
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
back.
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.
particular IBObjects component that should be used?
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
back.
> Date: Thu, 13 Dec 2001 17:21:56 -0900continually growing over time. It is useful to >be able to review the
> From: "dkLists" <dklists@...>
>Subject: Efficient Record Count
>
>All -
>
> I have a large table with approximately 1 million rows that will be
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.
>be as simple as doing a SELECT >COUNT(*) FROM TABLE? If not, is there a
>Would it be much faster to do this in a stored procedure? If so, would it
particular IBObjects component that should be used?
>
>All advice welcome.
>
>Thanks in advance.
>___________________________________
>GreatLand Technology
>
>inquiries@...
>___________________________________