379
379
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
380
380
explain select * from t1 where pk1 < 7500 and key1 = 10;
381
381
id select_type table type possible_keys key key_len ref rows Extra
382
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where
383
383
explain select * from t1 where pktail1ok=1 and key1=10;
384
384
id select_type table type possible_keys key key_len ref rows Extra
385
1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
386
386
explain select * from t1 where pktail2ok=1 and key1=10;
387
387
id select_type table type possible_keys key key_len ref rows Extra
388
1 SIMPLE t1 index_merge key1,pktail2ok key1,pktail2ok 4,4 NULL 1 Using intersect(key1,pktail2ok); Using where
389
389
explain select * from t1 where (pktail2ok=1 and pk1< 50000) or key1=10;
390
390
id select_type table type possible_keys key key_len ref rows Extra
391
391
1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where