今天写了一个统计sql,在一个近亿条数据的表上履行,200s都查不出成果。SQL以下:
select customer,count(1) c from upv_** where created between "2015-07-06" and "2015-07-07" group by customer having c > 20 order by c desc s
今天写了一个统计sql,在一个近亿条数据的表上履行,200s都查不出成果。SQL以下:
select customer,count(1) c from upv_** where created between "2015-07-06" and "2015-07-07" group by customer having c > 20 order by c desc s