Hello .
select * from table advert where advert.hide='show' and advert.end_putdate > 1481144400 order by advert.premium_adv DESC, advert.sort_time DESC limit 0 , 10 The base 800 thousand. Announcement, 600 thousand - active. Long chooses ads. Does it make sense to use indexes? - if so, for this sample, how to create it correctly?
at the moment I have such indexes
id_advert - primary hide,premium_adv,premium_adv ,sort_time - составной Page generation: for the first time the download from 3 to 9 seconds became (was 20), the next 0.2 seconds.
I do in the database explain on this request (above) and get my indices and row 600 thousand
It turns out that instead of 10 all are selected? Tell me, what I do not understand to the end?
Thank !
end_putdatein the index? - D-sidepremium_adv,premium_adv- Sarkis Allahverdian