veza/veza-backend-api/migrations/940_performance_indexes_v0951.sql
senke da837fc085
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
chore(release): v0.951 — Loadtest (500 req/s, 1000 WS, 50 uploads, perf indexes)
2026-03-02 19:22:38 +01:00

8 lines
468 B
SQL

-- v0.951: Performance indexes for load test critical queries
-- Targets: ListProducts (status + created_at), auth sessions, tracks list
-- products: ListProducts default query (status=active ORDER BY created_at DESC)
CREATE INDEX IF NOT EXISTS idx_products_status_created_at ON public.products(status, created_at DESC);
-- products: Filter by seller (seller dashboard)
CREATE INDEX IF NOT EXISTS idx_products_seller_id_status ON public.products(seller_id, status);