time php test.php
insert into t1 select * from t2 复制t2数据到t1
set profiling=1; //打开性能分析工具
show profiles
order by length(char) 根据字段长度排序
select count(distinct left(name, 1)) 统计去重查询name字段第一个字的个数
2018-06-04 更新:链接: https://pan.baidu.com/s/19ymv4HEUgvWdKhZYHo97kQ 密码: i9hq
查看数据库的所有表数据/索引占用
SELECT CONCAT(table_schema,'.',table_name) AS 'Table Name',
CONCAT(ROUND(table_rows/1000000,2),'M') AS 'Number of Rows',
CONCAT(ROUND(data_length/(1024*1024*1024),2),'G') AS 'Data Size',
CONCAT(ROUND(index_length/(1024*1024*1024),2),'G') AS 'Index Size' ,
CONCAT(ROUND((data_length+index_length)/(1024*1024*1024),2),'G') AS'Total'FROM information_schema.TABLES WHERE table_schema LIKE 'database';
左边本地本次commit,中间上一版本,右边远程
网友评论