查看分区数据量,查看全库数据量 USE information_schema; SELECT PARTITION_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 'sale_data'; SELECT table_name,table_rows FROM TABLES WHERE TABLE_SCHEMA = 'db_name' ORDER BY table_rows DESC ; http://my…
explain显示了mysql如何使用索引来处理select语句以及连接表.可以帮助选择更好的索引和写出更优化的查询语句. 1.创建数据库 创建的sql语句如下: /* Navicat MySQL Data Transfer Source Server : localhost-newpassword Source Server Version : 50550 Source Host : localhost Source Database : testExplain Target Server V…