Repository navigation
Commit 8013105
Reverts #9591 (`perf(db): stop per-id planning of wide #e reads`).
Hiding the `#e` id arrays from the planner made reads in large
communities much slower in prod. This is a straight revert.
## Evidence
- **8 → 9 row cliff on the channel head read with `include_aux`:** 125ms
at 8 rows, 1.4s at 9 rows, about 2.3s at 20 rows.
- **Replica `EXPLAIN ANALYZE`, 20-id aux query:** 130ms with the ids
visible to the planner, 2240ms with them hidden. The hidden plan reads
and discards about 625k rows in `events_p2026_07_08_legacy`.
- **200-id thread page (1,593-reply thread):**
| ids | plan | exec |
|---|---|---|
| visible (this PR) | 78ms | 1,387ms |
| hidden (#9591) | 10ms | 18,146ms |
#9591 saves planning time but makes execution about 13x slower.
- **Prod:** #9591 reached bb-block prod with
`main-20261120032502-8d4b301` (2026-11-20 14:48Z).
## Notes
- #9674 used the same trick for thread-window aux reads and had the same
risk. It's now closed.
- Any future change like this should be checked with `EXPLAIN ANALYZE`
on the replica first. A test that runs EXPLAIN against a large community
is a follow-up, not part of this PR.
## Testing
- `cargo test -p buzz-db --lib e_tag`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7382130 commit 8013105
2 files changed
Lines changed: 8 additions & 107 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3693 | 3693 | | |
3694 | 3694 | | |
3695 | 3695 | | |
3696 | | - | |
3697 | | - | |
3698 | | - | |
3699 | | - | |
3700 | | - | |
3701 | | - | |
3702 | | - | |
3703 | | - | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
3713 | | - | |
3714 | | - | |
3715 | | - | |
3716 | | - | |
3717 | | - | |
3718 | | - | |
3719 | | - | |
3720 | | - | |
3721 | | - | |
3722 | | - | |
3723 | | - | |
3724 | | - | |
3725 | | - | |
3726 | | - | |
3727 | | - | |
3728 | | - | |
3729 | | - | |
3730 | | - | |
3731 | | - | |
3732 | | - | |
3733 | | - | |
3734 | | - | |
3735 | | - | |
3736 | | - | |
3737 | | - | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | | - | |
3743 | | - | |
3744 | | - | |
3745 | | - | |
3746 | 3696 | | |
3747 | 3697 | | |
3748 | 3698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
| 847 | + | |
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
1320 | | - | |
| 1319 | + | |
| 1320 | + | |
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | 1327 | | |
1364 | 1328 | | |
1365 | 1329 | | |
1366 | 1330 | | |
1367 | | - | |
| 1331 | + | |
1368 | 1332 | | |
1369 | 1333 | | |
1370 | | - | |
| 1334 | + | |
1371 | 1335 | | |
1372 | 1336 | | |
1373 | 1337 | | |
1374 | | - | |
| 1338 | + | |
1375 | 1339 | | |
1376 | | - | |
| 1340 | + | |
1377 | 1341 | | |
1378 | 1342 | | |
1379 | 1343 | | |
| |||
1695 | 1659 | | |
1696 | 1660 | | |
1697 | 1661 | | |
1698 | | - | |
| 1662 | + | |
1699 | 1663 | | |
1700 | 1664 | | |
1701 | 1665 | | |
| |||
3116 | 3080 | | |
3117 | 3081 | | |
3118 | 3082 | | |
3119 | | - | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | 3083 | | |
3133 | 3084 | | |
3134 | 3085 | | |
| |||
0 commit comments