Subject | Performance of the count Function. |
---|---|
Author | williamvdw2004 |
Post date | 2005-02-28T07:44:26Z |
I have a table with about 630 000 records. I do the following count
query. select count(transactionkey) from account.
This query takes about 30 seconds the first time and 3 seconds
subsequently. Transactionkey (bigint) is defined as the pimarykey of
the table I have also added a descending index to the transactionkey
column, page size is 8192. If I change the query to count the rows
in the backup table the same thing 30 seconds the first time and 3
seconds subsequently. Is there anything I can do to speed this up
(the first query?)
Thanks in Advance
William
query. select count(transactionkey) from account.
This query takes about 30 seconds the first time and 3 seconds
subsequently. Transactionkey (bigint) is defined as the pimarykey of
the table I have also added a descending index to the transactionkey
column, page size is 8192. If I change the query to count the rows
in the backup table the same thing 30 seconds the first time and 3
seconds subsequently. Is there anything I can do to speed this up
(the first query?)
Thanks in Advance
William