Query:
SELECT COUNT(online.account_id) cnt from online;
But online table is also modified by an event, so frequently I can see lock by runn
From this reference:
If you acquire a table lock explicitly with LOCK TABLES, you can request a READ LOCAL lock rather than a READ lock to enable other sessions to perform concurrent inserts while you have the table locked.