MySql: How to reduce execution time of this Query? <p>How to customize this query, It takes around 30 Second to take out results, total records in 'videos' table are about 0.5 million, 3 million members are present in 'Members' Table, is there any alternate Query or should i break this query in 2 select queries ?</p> <p>user_id is Indexed vid_id is Indexed</p> <pre><code>select a.ref_url , a.source , a.video_name , a.viewers , b.username , c.points from members_videos a inner join Members b on a.user_id = b.user_id inner join rankings c on c.user_id = b.user_id where a.cat_ids in (123,234,52,234,423,122) not in (110,99) order by a.vid_id Desc limit 10 </code></pre>