sql - Optimizing a MySQL Join Query? -
i have following query:
select * products p left join files f on f.contentid = p.productid p.state = 'active' , p.price > 0 order p.created desc limit 2200
currently, query takes 1.7 seconds 2200 rows. don't understand is, why time not decrease when change limit 2200 10, , more importantly, can speed up?
try :
explain select * products p left join files f on f.contentid = p.productid p.state = 'active' , p.price > 0 order p.created desc limit 2200
to see indexes need
Comments
Post a Comment