I am using a query like this:
SELECT * FROM videos WHERE id IN (SELECT video_id FROM videos_tags WHERE tag_id = 2)
to search videos with the same tags, but with about 8'000 videos this query is too slow. How can I make this query faster? Maybe a JOIN is faster? Something like select * from videos_tags left join videos on (videos_tags.video_id = videos.id) where videos_tags.tag_id = 2 is faster?