I have a query like this:
UPDATE table1 SET status = 'ANSWERED' WHERE table1.number IN (select table2.number from table2)
It should update status to ANSWERED if table1.number are already exist in table2.number
It is taking forever and still hanging..
In the table1 table, 300,000 rows.
In the table2 table, 24,000 rows.
table1.number and table2.number are the unique numbers.
how to improve the performance?
Create index on table1.number and table2.number fields and use the following query.