List:Falcon Storage Engine« Previous MessageNext Message »
From:Keith Murphy Date:January 25 2009 3:40am
Subject:Re: Quick question on row counts
View as plain text  
Excellent.  Thank you for the information.

Keith

Jim Starkey wrote:
> 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 rolled back.
>
> 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, 
> nothing more.
>
>


-- 
Editor
MySQL Magazine
http://www.mysqlzine.net

Thread
Problems with record visibility and how it is computedOlav Sandstaa21 Jan
  • search for null values in indexed columnsVladislav Vaintroub21 Jan
    • Re: search for null values in indexed columnsLars-Erik Bjørk21 Jan
    • Re: search for null values in indexed columnsKevin Lewis21 Jan
      • RE: search for null values in indexed columnsVladislav Vaintroub21 Jan
        • Re: search for null values in indexed columnsKevin Lewis21 Jan
      • Re: search for null values in indexed columnsJames Day23 Jan
  • Re: Problems with record visibility and how it is computedOlav Sandstaa23 Jan
    • Re: Problems with record visibility and how it is computedJim Starkey23 Jan
      • Re: Problems with record visibility and how it is computedKevin Lewis28 Jan
        • Re: Problems with record visibility and how it is computedJim Starkey28 Jan
          • Re: Problems with record visibility and how it is computedKevin Lewis28 Jan
            • Cycle Locking (was Problems with record visibility and how it iscomputed)Jim Starkey28 Jan
            • Re: Problems with record visibility and how it is computedAnn W. Harrison28 Jan
              • Re: Problems with record visibility and how it is computedJim Starkey28 Jan
                • Re: Problems with record visibility and how it is computedAnn W. Harrison28 Jan
                  • Re: Problems with record visibility and how it is computedOlav Sandstaa26 Feb
                    • New Transaction State object (Was: Problems with record visibility andhow it is computed)Olav Sandstaa16 Mar
                      • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Kevin Lewis16 Mar
                      • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Jim Starkey16 Mar
                        • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Olav Sandstaa19 Mar
                          • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Jim Starkey19 Mar
                            • RE: New Transaction State object (Was: Problems with record visibilityand how it is computed)Vladislav Vaintroub20 Mar
                            • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Olav Sandstaa20 Mar
                              • Re: New Transaction State object (Was: Problems with record visibilityand how it is computed)Jim Starkey20 Mar
          • Re: Problems with record visibility and how it is computedOlav Sandstaa28 Jan
            • Re: Problems with record visibility and how it is computedJim Starkey28 Jan
              • Another Idea for Transaction Lifetime ControlJim Starkey28 Jan
                • Re: Another Idea for Transaction Lifetime ControlJim Starkey29 Jan
              • RE: Problems with record visibility and how it is computedXuekun Hu4 Feb
          • Re: Problems with record visibility and how it is computedAnn W. Harrison28 Jan
  • Quick question on row countsKeith Murphy24 Jan
    • Re: Quick question on row countsJim Starkey25 Jan
      • Re: Quick question on row countsKeith Murphy25 Jan