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
Use
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED.
Version 5.0 Docs are here.
Version 5.1 Docs are here.