You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Collaboration: Merge MAX and COUNT into a single snapshot query
get_updates_after_cursor() ran a MAX(id) query on every call, followed
by a separate COUNT(*) query only when updates existed (max_id > cursor).
Both scan the same index range and can be combined into a single SELECT
that returns both values unconditionally.
Adds a null guard on the get_row() result to handle DB failures safely.
Saves 1 query per room when updates exist.
0 commit comments