Re: Table optimization ideas needed

From: Date: Thu, 27 Mar 2008 02:03:16 +0000
Subject: Re: Table optimization ideas needed
References: 1 2 3 4 5 6 7  Groups: php.db 
Request: Send a blank email to php-db+get-44825@lists.php.net to get a copy of this message
mysql> explain select count(*) from message; +----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+
| id | select_type | table   | type  | possible_keys | key    | key_len | ref  | rows     | Extra       |
+----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+
|  1 | SIMPLE      | message | index | NULL          | status |       1 | NULL | 23051499 | Using index |
+----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+ Three queries return the same results.
That's never going to be fast because you're using innodb tables. From a previous post:
Then you can imagine how much time sql such as "select a,b from table_name where c='d'" will take. I have a lot of tables like that. So my questions is: What's your practice to optimize tables like that?
I thought that's what you needed help with. ? -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#44825) next »