Subject RE: [ib-support] SELECT COUNT(*) ... - slow
Author Ann W. Harrison
At 01:21 AM 4/6/2002 +0200, Tobias Giesen wrote:
> > And the reason it doesn't, is that there may be
> > different numbers of rows for different concurrent
> > transactions.
>
>So what? It could maintain separate counters for each
>transaction, as well as a main counter for the committed
>rows. I'm sure it could.

Unfortunately, not all the committed rows are valid for
all transactions - at least not in repeatable-read mode.
For reasons having to do mostly with bad housebreaking,
I guess, we feel that if a single transaction counts the
same table twice, it should get the same answer.


>However, this optimization feature doesn't seem to have
>been considered worth it.

I assure you that if it had been possible, we would have
done it.


Regards,

Ann
www.ibphoenix.com
We have answers.