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
{{ message }}
Repository navigation
perf(platform): index user_notifications on (user_id, org_id, seq DESC) #5158
WHERE user_id = … AND org_id = …, ORDER BY seq DESC;
a LIMIT of 30 by default, at most 100, with a seq cursor.
The table's indexes are user_notifications_user_created (user_id, org_id, created_at_ms DESC) and user_notifications_user_unread (user_id, org_id, read, seq DESC) (db/migrations/0028_collab.sql:29-32), plus two partial ones.
No index has (user_id, org_id, seq DESC). So the "All" view, which has no read filter, must either merge the two read ranges or read every row of the user and sort them before the LIMIT.
Callers: GET /api/app/collab/notifications (domains/collab/routes.ts:44-66, useMyNotificationsList) and GET /notifications/sync (rest/v1-notifications.ts:98,159).
What to do
A migration with CREATE INDEX IF NOT EXISTS … ON app.user_notifications (user_id, org_id, seq DESC).
An EXPLAIN probe proving that the "All" page walks that index.
Done means:
the "All" page reads at most one page of index entries;
Landed on release/0.6 with feature train #5197 (#5197, rebased in at 2026-10-31 11:15:15Z) as 1cdb7b0 (TALE-254, "perf(platform): index the bell's All page by seq"). release/0.6 was then rebased onto maindf6105c at 11:25Z, where this commit is now dd90ba2. It ships with 0.6.0. GitHub closes an issue only for a commit on main, so the feature-train role (TALE-239) closes it.
Activity
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
tale-code-bot commentedon Oct 31, 2026
Landed on
release/0.6with feature train #5197 (#5197, rebased in at 2026-10-31 11:15:15Z) as 1cdb7b0 (TALE-254, "perf(platform): index the bell's All page by seq").release/0.6was then rebased ontomaindf6105c at 11:25Z, where this commit is now dd90ba2. It ships with 0.6.0. GitHub closes an issue only for a commit onmain, so the feature-train role (TALE-239) closes it.perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq
perf(platform): index the bell's All page by seq