SQL> select count(*),ID from test_2 group by id; COUNT(*) ID ---------- ---------- 131072 1 1179648 2 select count(*) from test_2 where id <>2;------利用函数索引优化: select count(*) from test_2 where id <>2;SQL> SQL> select count(*) from tes…
paip.索引优化---sql distict—order by 法 作者Attilax , EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/attilax 原语句: select SQL_NO_CACHE DISTINCT ( gaopinzi.HEZI), LEFT (hezi, 1) AS lft, RIGHT (hezi, 1) AS rit FROM gaopi…