The table is a hot spot for contention so we must minimize the duration lock are kept on it. As at the start of a transaction, the cache may be sync and so it locks all the row in the table, the transaction used for this query should not be the main one that lasts a long time. Idem for the commit. issue8447 review283591002