SQL优化 MySQL版
- 作者: 五速梦信息网
- 时间: 2026年04月04日 13:25
SQL优化 MySQL版 - 避免索引失效原则(一)
<div>
StanleyBlogs
2024-10-13 15:26:02
</div>
<pre>select * from book where authroid = 1 and typeid = 2;</pre><pre>explain select * from book where authroid = 1 and typeid*2 = 2;</pre><pre>explain select * from book where authroid*2 = 1 and typeid*2 = 2;</pre><pre>select * from book where authroid*2 = 1 and typeid = 2;</pre><pre>select * from book where authoid = 1 and typeid = 2</pre><pre>explain select * from book where authoid ! = 1 and typeid = 2</pre><pre>explain select * from book where authoid ! = 1 and typeid ! = 2;</pre>
<div>






