Commit 089d1e6
committed
perf(database): index WorkerDeployment on (environmentId, status, id) for the deployments list
The deployments list query filters by status and paginates by id desc, but no
index covered status, so Postgres seq-scanned the environment's deployments and
discarded ~350 non-matching rows per row returned. Add (environmentId, status,
id) so the status filter is index-satisfied and the scan is bounded to the page.1 parent 7b7d489 commit 089d1e6
3 files changed
Lines changed: 8 additions & 0 deletions
File tree
- .server-changes
- internal-packages/database/prisma
- migrations/20260812130000_add_worker_deployment_environment_id_status_id_index
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2214 | 2214 | | |
2215 | 2215 | | |
2216 | 2216 | | |
| 2217 | + | |
2217 | 2218 | | |
2218 | 2219 | | |
2219 | 2220 | | |
| |||
0 commit comments