分享到:
发表于 2009-02-02 09:01:15 楼主 | |
mysql> explain select * from pdf use index (p_id) where p_id>10000; ERROR 1176 (42000): Key 'p_id' doesn't exist in table 'pdf' use_index(key_list) 其中的key_list是如何来的 |
|
楼主热贴 |
发表于 2009-02-02 09:01:15 2楼 | |
mysql> show index from pdf; +-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ | pdf | 0 | PRIMARY | 1 | p_id | A | 936493 | NULL | NULL | | BTREE | | | pdf | 1 | p_hotstatus | 1 | p_hotstatus | A | 3 | NULL | NULL | YES | BTREE | | | pdf | 1 | c_id | 1 | c_id | A | 395 | NULL | NULL | | BTREE | | | pdf | 1 | l_id | 1 | l_id | A | 37459 | NULL | NULL | YES | BTREE | | | pdf | 1 | p_time | 1 | p_time | A | 72037 | NULL | NULL | | BTREE | | | pdf | 1 | u_id | 1 | u_id | A | 9 | NULL | NULL | | BTREE | | | pdf | 1 | p_status | 1 | p_status | A | 2 | NULL | NULL | YES | BTREE | | +-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+ 7 rows in set (0.00 sec) 其中的Key_name段就是 |
|
发表于 2009-02-02 09:01:15 1楼 | |
键名啊。。不是字段名 |
|
针对ZOL星空(中国)您有任何使用问题和建议 您可以 联系星空(中国)管理员 、 查看帮助 或 给我提意见