explain SELECT id,topid FROM `#@__arctype` WHERE id in(1,2,3,5,6) AND id<>2 AND topid<>2
1 SIMPLE dede_arctype index PRIMARY,a a 4 6 Using where; Using index
1 SIMPLE dede_arctype index PRIMARY,a a 4 6 Using where; Using index
SELECT id,topid FROM `#@__arctype` WHERE id in(1,3,5,6) AND topid<>2
效果还是很差。我在id,topid上建立了联合索引