数据库

老司机也必须掌握的MySQL优化指南

时间:2010-12-5 17:23:32  作者:域名   来源:IT科技类资讯  查看:  评论:0
内容摘要:复制mysql>explainpartitionsselectcount(1)fromuser_partitionwhereidin(1,2,3,4,5); +----+-

老司机也必须掌握的MySQL优化指南
复制mysql> explain partitions selectcount(1) from user_partition where id in (1,老司2,3,4,5);  +----+-------------+----------------+------------+-------+---------------+---------+---------+------+------+--------------------------+ | id | select_type | table          | partitions | type  | possible_keys | key     | key_len | ref  | rows | Extra                    |  +----+-------------+----------------+------------+-------+---------------+---------+---------+------+------+--------------------------+ |  1 | SIMPLE      | user_partition | p1,p4      | range | PRIMARY       | PRIMARY | 8       | NULL |    5 | Using where; Using index |  +----+-------------+----------------+------------+-------+---------------+---------+---------+------+------+--------------------------+ 1 row inset (0.00 sec)  1.2.3.4.5.6.7.
copyright © 2025 powered by 编程之道  滇ICP备2023006006号-34sitemap