skip to Main Content

MySQL update via join – why is it slow?

I have the following query: UPDATE `temp_table`, `sms` SET `sms`.`to` = `temp_table`.`new_value` WHERE `sms`.`to` = `temp_table`.`old_value`; temp_table has ~200,000 rows. sms has ~2,000,000 rows. sms.to, temp_table.new_value, and temp_table.old_value are VARCHAR(255) with indexes. Values are UK phone numbers. The update query…

VIEW QUESTION

SQL Filter Query Hangs with No Response – Postgresql

SELECT users.id FROM orders, users, "userEmailCollections", "reviewTracks", "loyaltyCampaignRedemptions" WHERE (orders."restaurantTableId" IN (12,7,9,8,10,11,14,99,100,6) AND users.id = orders."orderUserId") OR ("userEmailCollections"."restaurantId" = 6 AND "userEmailCollections"."userId" = users.id) OR ("reviewTracks"."restaurantId" = 6 AND users.email = "reviewTracks"."email") OR ("loyaltyCampaignRedemptions"."restaurantId" = 6 AND "users".id = "loyaltyCampaignRedemptions"."userId");…

VIEW QUESTION
Back To Top
Search