I have the next query:
UPDATE plates_owners SET deleted=1 WHERE plate_id=4748 AND branch_id IN (23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,48,64,79,82,83,102,103,130,169,209,218,220,221,222,223,224,226,231,232)
Here is my
plate_id | int(11) unsigned | PRI branch_id | int(11) unsigned | PRI show_app | int(1) unsigned | deleted | int(1) unsigned | app_disabled | int(1) unsigned | modified | timestamp |
This query takes over 50 seconds to execute, is there anyway to optimize it?
PS: The less values I add to the IN statement the faster the query becomes