Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

Lock wait timeout exceeded; try restarting transaction error - do I need a different index? (no replies)

$
0
0
Hi

I have a table of about 50 million rows, on which I'm applying the following query:

DELETE FROM `myTable`WHERE ( myID, theirID ) IN (("333335412","38645"), (("333335412","772288"),(("333335412","44436"));

...only there are 5000, not 3 entries in the query.

My table has a two column index over myID and theirID (BTREE)

I'm getting the following error often:

Lock wait timeout exceeded; try restarting transaction error - some of the queries are taking 140 seconds or longer

I would have thought a delete would be a lot faster than that - should I be using a different index to speed things up?

Thanks for your time and help.

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>