Every unread-count poll reads every active message
Act nowNo one changed anything here. It is built into the design: App1's unread-count query filters on active = 1 plus several OR-conditions and groups by thread, so each 30-second poll reads every active message. Rows read follow the messages table, while requests stay flat. Lock waits are 0: this is not a lock storm.