Forum Moderators: open
I ran a query that seems to have hung my server. :(
DELETE FROM `cart_cart`
WHERE KeyCart NOT IN ( SELECT DISTINCT `KeyCart` FROM `cart_lines` )
AND `TSCreation`<= DATE_SUB(CURDATE(),INTERVAL 60 DAY)
`cart_cart` had just over 1 million records and `cart_lines` had 1,930 (with 900 distinct KeyCarts).
The site that checks this db is hung. Can I terminate the mysql process or will that corrupt the open databases?
And, before I look like too much of a tool, the SELECT of this command only took 0.0015 seconds to run. I knew the DELETE would take longer but it's been over 5 minutes and I was *not* expecting that.