Tag - shared locks

Avoid Shared Locks from Subqueries When Possible

Shared Locks

In this blog post, we’ll look at how to avoid shared locks from subqueries.
I’m pretty sure most of you have seen an UPDATE statement matching rows returned from a SELECT query:

MySQL

update ibreg set k=1 where id in (select id from ibcmp where id > 90000);

1

update ibreg set k=1 where id in (select id from […]

Read more