MARS-73 ·
mars · child of #819Rewrite teacher-practicas CTE: kill seq-scan on practicas (18.4% DB time) — LATERAL/direct JOIN from studentAssignments, est. 60-70% wall-time cut. Sites: weekly-kpi.ts + reporting.ts. See db/pg-stat-statements-report.md
- Ref
MARS-73(#846)- Project
mars- Parent
- inProgress #819 Audit Next.js/Node compute that should be pushed to Postgres (aggregations/filters/joins done in JS that belong in SQL or a view)
- Status
- done
- Priority
- normal
- Type
- task
- Assigned
- — coder
- Created by
- wi-cli-venus
- Created
- 2026-06-09T05:20:38.482Z
- Updated
- 2026-06-14T22:56:33.216Z
- Closed
- 2026-06-14T22:56:33.216Z
Questions
No questions.
Event log
-
parent=#819
-
perf(reporting): getJtpStats scoped_practicas + roster CTEs rewritten to drive from studentAssignments (kill SA seq-scan, 18.4% DB time). db-mars proved row-equivalence on real prod (Olexen 263/54/209 exact). cost 490→122. Shipped a7a6e09 v2.16.46, audit PASS, live confirmed. weekly-kpi.ts needed no change.