<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[mailaidedt的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/mailaidedt</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; mailaidedt]]></copyright><item><title><![CDATA[处理千万级以上的数据提高查询速度的方法（转）]]></title><link>https://blog.youkuaiyun.com/mailaidedt/article/details/52858442</link><guid>https://blog.youkuaiyun.com/mailaidedt/article/details/52858442</guid><author>mailaidedt</author><pubDate>Wed, 19 Oct 2016 12:49:57 +0800</pubDate><description><![CDATA[(找不到原出处了，见谅)

处理千万级以上的数据提高查询速度的方法：
1.应尽量避免在 where 子句中使用!=或
2.对查询进行优化，应尽量避免全表扫描，首先应考虑在 where 及 order by 涉及的列上建立索引。
3.应尽量避免在 where 子句中对字段进行 null 值判断，否则将导致引擎放弃使用索引而进行全表扫描，如：
select id from t where ]]></description><category></category></item></channel></rss>