Keith Murphy wrote:
> Hello everyone,
> I have a quick question. Testing seems to indicate that Falcon keeps
> accurate stats on the number of rows in a table. It appears similar to
> the way MyISAM tables work. This can shown by running a 'SHOW TABLE
> STATUS' command and comparing the number of rows with the SELECT
> COUNT(*) command. Am I correct in this? Or have I not done enough tests?
> Also, SELECT COUNT(*) appears to return a number of rows much quick
> than a similar command on InnoDB tables. Again..similar to MyISAM. Am
> I accurate in this?
The row count is Falcon is not guaranteed accurate and should not be
depended upon. Falcon does a good faith effort to track table
cardinalities, but number of records visible to any given transaction is
not necessarily the number of committed records in the table. Other
transaction may have committed records that are not yet visible, and
pending transactions have have insert records that will eventually be
Count(*) is accurate from a transaction's perspective, but will not
include record insert -- even if committed -- by a concurrent transaction.
The record could from SHOW TABLE STATUS is a good faith estimate,