Subject | Re: [firebird-support] Select count(*) using pk |
---|---|
Author | Helen Borrie |
Post date | 2005-02-10T00:27:02Z |
At 07:44 PM 9/02/2005 +0200, you wrote:
inserts by other transactions...what if transaction nnnn performs 10,000
inserts and then rolls back? Stand inside any transaction and try to work
out what a record count really means...
./hb
> >>There's nothing to speed up count (*) it's rather a no-no. ;-)But it could never be considered accurate...no transaction can see pending
>
>Well, in FB there is nothing, but theoretically, if we think in abtract
>way : automatic counter for each table
>record_count++ on insertion, and record_count-- on deletion, and retrieval
>that counter from select count(*) ...
>would be much faster. (especally with 14 mil. records :))
inserts by other transactions...what if transaction nnnn performs 10,000
inserts and then rolls back? Stand inside any transaction and try to work
out what a record count really means...
./hb