Commit 51c1316
committed
perf(repository): add indexes on sp_action.rollout and rollout_group
Rollout monitoring queries (existsByRolloutId, getStatusCountByRolloutId,
getStatusCountByRolloutGroupId) filter by rollout or rollout_group on
sp_action. The flyway baseline did not index either column, so Postgres
falls back to Seq Scan on every monitoring poll. With 16k action rows
this is meaningful — the group-count query takes ~500 ms without the
index and ~27 ms with it (Index Only Scan, Heap Fetches: 0).
Bench (16k rows, 1000 iter):
- WHERE tenant=? AND rollout_group=? 18.6x faster on PG
17.6x faster on YugabyteDB
- WHERE tenant=? AND rollout=? GROUP BY status 2.5x faster on PG
1.5x faster on YugabyteDB
Adds V1_20_2 sibling migrations for POSTGRESQL, H2, and MYSQL.1 parent eb53cfa commit 51c1316
3 files changed
Lines changed: 40 additions & 0 deletions
File tree
- hawkbit-repository/hawkbit-repository-jpa-flyway/src/main/resources/db/migration
- H2
- MYSQL
- POSTGRESQL
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments