MySQL Forums :: InnoDB :: COUNT(*) on innodb

Advanced Search

Re: COUNT(*) on innodb
Posted by: Jay Pipes ()
Date: November 24, 2005 01:03PM

Jue (Jacky) Shu wrote:
> As the solution using a counter table, that means
> recoding in each INSERT/DELETE for each table.

Well, you *could* upgrade to MySQL 5 and use triggers! That would save you a LOT of work... :)

> I'm evaluating InnoDB storage engine because of
> lacking for referential integrity, it is too hard
> to keep data clean.
> Also in the replicatoin scenario, if a job on
> master is killed, there is no way to know how much
> rows are affected in the previous job. The log on
> slave can only tell me the job is killed.

I understand. You're in the same boat as a number of people. This restriction on InnoDB tables has persisted for quite some time; I'm not sure if there are current plans to look into a method of storing row counts for fast access (Heikki, perhaps?) But I can understand why it's complicated, as each InnoDB row is "versioned" using MVCC, so row counts would need to be isolation-level accurate. This makes things very complex...

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster?

Options: ReplyQuote

Subject Views Written By Posted
COUNT(*) on innodb 11683 Jacky Shu 11/24/2005 09:15AM
Re: COUNT(*) on innodb 4439 Jacky Shu 11/24/2005 09:46AM
Re: COUNT(*) on innodb 4247 Jay Pipes 11/24/2005 11:53AM
Re: COUNT(*) on innodb 3983 Jacky Shu 11/24/2005 12:16PM
Re: COUNT(*) on innodb 3852 Jay Pipes 11/24/2005 12:39PM
Re: COUNT(*) on innodb 3516 Jacky Shu 11/24/2005 12:55PM
Re: COUNT(*) on innodb 3924 Jay Pipes 11/24/2005 01:03PM
Re: COUNT(*) on innodb 2982 Jacky Shu 11/24/2005 01:11PM
Re: COUNT(*) on innodb 2941 Jay Pipes 11/24/2005 01:32PM
Re: COUNT(*) on innodb 2768 Jacky Shu 11/24/2005 02:07PM
Re: COUNT(*) on innodb 3135 James Day 11/24/2005 08:00PM
Re: COUNT(*) on innodb 2736 Jacky Shu 11/24/2005 08:38PM
Re: COUNT(*) on innodb 2599 James Day 11/25/2005 05:15PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.