Mathias <[EMAIL PROTECTED]> wrote on 06/28/2005 01:11:59 PM:

> Selon [EMAIL PROTECTED]:
> 
<snip>
> 
> Thanks Shawn, but i'm not speaking about data consistency during 
> transaction and
> isolation levels.
> I spoke about what is seen in the data dictionary as num_rows an why
> it  can not
> be used even it's quite faster.
> 
> 
> 
> Hope that helps
> :o)
> Mathias

And I was trying to explain why there is not a number IN the data 
dictionary that represents "row count". Unless a separate dictionary is 
maintained FOR EACH TRANSACTION, the record counts will be wrong.  The 
record counts determined by SELECT COUNT(*) are *per transaction* so the 
only way to do a record count is by checking each row (pending or not) 
against cross-transaction isolation.

This has everything to do with the row-level locking built into InnoDB and 
unless they enhance the engine to maintain a list of table statistics (I 
think this is part of what you are calling the dictionary) for each 
transaction, there can't be a rapid lookup of the row count. Right now I 
don't see that as high on their priorities.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to