Skip to content

Add composite (last_transition_time, job_id) index on lookout.job#4715

Merged
j8169 merged 1 commit intomasterfrom
lookoutdb-idx-job-ltt-jobid
Feb 25, 2026
Merged

Add composite (last_transition_time, job_id) index on lookout.job#4715
j8169 merged 1 commit intomasterfrom
lookoutdb-idx-job-ltt-jobid

Conversation

@j8169
Copy link
Contributor

@j8169 j8169 commented Feb 25, 2026

When we run analytical queries we pull data by last transition time and job id.

Without an index, this requires a full sequential scan plus a parallel sort.

When we run analytical queries we pull data by last transition time and job id.

Without an index, this requires a full sequential scan
plus a parallel sort. 

The composite index eliminates both the sequential scan and the sort:
- ORDER BY (ltt, job_id) matches the index exactly — no sort needed
@j8169 j8169 enabled auto-merge (squash) February 25, 2026 16:27
@j8169 j8169 merged commit 1479227 into master Feb 25, 2026
23 of 27 checks passed
@j8169 j8169 deleted the lookoutdb-idx-job-ltt-jobid branch February 25, 2026 16:34
nikola-jokic pushed a commit that referenced this pull request Feb 26, 2026
)

When we run analytical queries we pull data by last transition time and
job id.

Without an index, this requires a full sequential scan plus a parallel
sort.

Signed-off-by: Nikola Jokic <jokicnikola07@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants