MySQL, Query, Optimization, Web Performance, Database.
query below. 2, 300,000 data test, aa and bb are separate index cases, the following query rate is faster than or. 1.3, avoid using not in Not in can not generally use the index; the primary key field can 1.4, where to avoid using the judgment of null 1.5, like can not pre-position percent like