Hi folks, 

Is there a way to speed up count(*) operations on InnoDB tables?

I have a table with roughly 18 million rows in it which has the
following
structure:

CREATE TABLE `tbl_test` (
  `col_serial` varchar(32) default NULL,
  UNIQUE KEY `col_serial` (`col_serial`)
) TYPE=InnoDB;

+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| col_serial | varchar(32) | YES  | MUL | NULL    |       |
+------------+-------------+------+-----+---------+-------+

Running a count(*) on the table takes about 2 hours, which
seems rather long. The only strange thing I've thought of looking
into so far is that the person who made this table used a bit of
a weird setup (unique key instead of using primary key). 

Am I missing something or is this normal for InnoDB tables?

Regards,

Mark Steele
Implementation Director
CDT inc.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to