Subject | Re: select count(*) is slow |
---|---|
Author | Adam |
Post date | 2005-06-01T03:27:47Z |
--- In firebird-support@yahoogroups.com, "Jonathan" <delphimania@g...>
wrote:
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.
http://groups.yahoo.com/group/firebird-support/message/56457
Adam
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.
>Yes, just add a pinch of creativity. I have this stored in my bookmarks.
> Is there anyway to improve this ?
http://groups.yahoo.com/group/firebird-support/message/56457
Adam