Am trying to get the all rows from Tabl1 which are not available in Table2 with help of NOT IN MSQL query. But am getting timeout exception and query is not getting executed. Below is the mysql query which I am using.
SELECT * FROM identity WHERE
unique_id NOT IN (SELECT Message_Queue.index FROM Message_Queue);
Could any please tell the reason or any other way for replacement of NOT IN operation?