I have a MySGL query:
UPDATE Feeds
SET Quantity = (SELECT Inventory.Quantity
FROM Inventory
WHERE Feeds.SKU = Inventory.SKU)
WHERE EXISTS (SELECT Inventory.Quantity
FROM Inventory
WHERE Feeds.SKU = Inventory.SKU);
It's working well, but very slow. The database is MySQL inodb, rows is around 50,000, to run the execution takes about half of hour. How can I decrease the execution time? Thanks in advance.