Commit Graph
1 Commits
Author SHA1 Message Date
Omar Sobh 0c57f52502 migrations: 0029 — targeted indexes for hot queries
Each index added after reading its call site; no just-in-case coverage.
- outbox_queued_idx: partial (created_at) WHERE status='queued'. The
  drainer pops the oldest queued row workspace-agnostically; the existing
  (workspace_id, created_at DESC) index doesn't help.
- audit_log_workspace_event_idx: (workspace_id, event_type, created_at DESC).
  Rate limiting fires on every door tool call and A2A invocation; counts
  scan the recent tail.

Tables whose only access pattern is a PK lookup were left alone.
2026-07-05 18:48:55 -07:00