Add performance regression detection: indexes, timing middleware, benchmark script

Nightshift-Task: perf-regression
Nightshift-Ref: https://github.com/marcus/nightshift
This commit is contained in:
2026-03-20 02:44:57 -04:00
parent ccd0fb2155
commit 0a1e3666ef
5 changed files with 94 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
-- Performance indexes for high-traffic query patterns
CREATE INDEX IF NOT EXISTS idx_paychecks_period ON paychecks(period_year, period_month);
CREATE INDEX IF NOT EXISTS idx_paycheck_bills_paycheck_id ON paycheck_bills(paycheck_id);
CREATE INDEX IF NOT EXISTS idx_actuals_paycheck_id ON actuals(paycheck_id);
CREATE INDEX IF NOT EXISTS idx_one_time_expenses_paycheck_id ON one_time_expenses(paycheck_id);
CREATE INDEX IF NOT EXISTS idx_financing_payments_plan_id ON financing_payments(plan_id);
CREATE INDEX IF NOT EXISTS idx_financing_plans_active ON financing_plans(active);