-- Add missing indexes for performance-critical queries
-- 2026-04-18 Release readiness audit

-- Rate limit events cleanup (DELETE WHERE created_at < ...)
CREATE INDEX IF NOT EXISTS idx_rle_created_at ON rate_limit_events(created_at);

-- Billing subscriptions plan lookup
CREATE INDEX IF NOT EXISTS idx_billing_sub_plan ON billing_subscriptions(plan_id);

-- Knowledge items created_by lookup
CREATE INDEX IF NOT EXISTS idx_ki_created_by ON knowledge_items(created_by);
