Commit 0247f66
Bound /v1/notifications initial load to last 90 days (#761)
Heavy users saw /v1/notifications/:id p50 ~2.2s (max 8.9s) because the
query had no upfront time bound on the initial load path — the planner
had to materialize every notification matching user_ids, run per-row
EXISTS checks and joins, then group/sort/limit at the very end.
On the initial load (timestamp_offset=0 AND group_id_offset='') bound
n.timestamp to the last 90 days. Pagination (timestamp_offset > 0) stays
unbounded so scrolling further back still works.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent c6c86d7 commit 0247f66
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
0 commit comments