刚从生产环境导了一个大表到测试环境,迫不及待的要好好玩弄一下。  

1.coun(1)

select count(1) from table_name;

条数: 567979280

时间:4:47

2.count 索引字段

select count(code) from table_name;

条数: 567979280

时间:1:33

3.count 复合索引第一个字段

select count(monthday) from table_name;

条数: 567979280

时间:1:39

4.count 复合索引非第一个字段

select count(area) from table_name;

条数: 567979280

时间:1:37

select count(type) from table_name;

条数: 567979280

时间:1:41

posted on 2017-07-18 12:03  Flink菜鸟  阅读(764)  评论(0编辑  收藏  举报