Repository navigation
Handle DB Performance Issues by Adding a New Index for Trigger - #69038
Merged
Merged
Conversation
AutomationDev85
requested review from
XD-DENG,
ashb and
ephraimbuddy
as code owners
June 26, 2026 13:01
kaxil
reviewed
Jun 27, 2026
kaxil
reviewed
Jun 27, 2026
kaxil
reviewed
Jun 27, 2026
kaxil
reviewed
Jun 27, 2026
kaxil
reviewed
Jun 27, 2026
kaxil
approved these changes
Jun 30, 2026
kaxil
left a comment
Member
There was a problem hiding this comment.
Unsure if this will make 3.3.0 cut but lgtm
AutomationDev85
force-pushed
the
feature/add-index-for-trigger
branch
from
July 13, 2026 11:17
d5a4a83 to
4ff48b9
Compare
Contributor
Author
|
@kaxil @dstandish @seanmuth I updated the PR to align with Airflow 3.4. Do you have any hints or feedback from your side? |
Contributor
|
@jedcunningham do you mind taking a look at this? |
AutomationDev85
force-pushed
the
feature/add-index-for-trigger
branch
2 times, most recently
from
August 6, 2026 08:47
1f81bb8 to
006ff77
Compare
Member
Conflicts unfortunately |
AutomationDev85
force-pushed
the
feature/add-index-for-trigger
branch
from
August 10, 2026 15:36
006ff77 to
f6f74fa
Compare
Contributor
Author
Thanks for the ping. I rebased the branch. |
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Aug 14, 2026
Co-authored-by: AutomationDev85 <AutomationDev85>
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Sep 11, 2026
Co-authored-by: AutomationDev85 <AutomationDev85>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
We are currently using Airflow 3.2.2 and have run into the following issue:
We operate an Airflow instance with 45 triggerers, and our database reached 100% CPU utilization. We identified that the high load was caused by two queries originating from the trigger model:
The high CPU load occurred because these queries resulted in full table scans. To address this, we added the following index:
CREATE INDEX idx_trigger_triggerer_queue_id ON public.trigger USING btree (triggerer_id, queue, id)CPU utilization dropped immediately after adding the index.
What do you think about this solution? I’m looking forward to your feedback.
Details of change:
Important
🛠️ Maintainer triage note for @AutomationDev85 · by
@potiuk· 2026-07-08 15:51 UTCSome review feedback from the maintainers is waiting on you (2 unresolved threads):
The ball is in your court — you've been assigned to this PR. Reply or push a fix in each thread, then mark them resolved. See the Pull Request quality criteria.
Automated triage — may be imperfect; a maintainer takes the next look.