My DB table name_info has it 30K row & terms table 60K row, When select not in table, server CPU goes up.
How can I best write a query that select 1 row fast?
SELECT slug FROM terms WHERE slug LIKE 'nm%' AND slug NOT IN
(SELECT imdb_id FROM name_info) LIMIT 1