Subject Re: select count(*) is slow
Author Adam
--- In firebird-support@yahoogroups.com, "Jonathan" <delphimania@g...>
wrote:
> Why is the "select count(*) from tablename" run slow in firebird ?

Because Firebird uses multi-version records, the only way to know
whether a record exists or not (in the context of your transaction) is
to take a visit to the data page the record is located on. Non-multi-
version records (is that even a word?) can just count the index or even
faster store the record count for each table.

>
> Is there anyway to improve this ?

Yes, just add a pinch of creativity. I have this stored in my bookmarks.

http://groups.yahoo.com/group/firebird-support/message/56457

Adam