使用索引的列需要有隔離列:隔離是指不能是表達(dá)式的一部分,也沒有位于函數(shù)如:select actor_id from sakila.actor where actor_id + 1 = 5;select * from PRoduct where to_days(out_date)-to_days(current_date)<= 30 ;使用前綴索引取數(shù)值的前綴進(jìn)行索引使用方式可以為create index idx_name on table_name(col_name(n))