You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid full table scan on /structure/{dag_id} #60883
The task_instance.dag_version_id column was added in migration 0047_3_0_0_add_dag_versioning.py but no index was created. This causes slow query performance when filtering/joining on this column.
Problem:
The column is a FK to dag_version.id and used to filter in some queries
Without an index, we get full table scans on task_instance
Affected queries:
UI grid endpoint filtering task instances by dag_version_id
Any query joining task_instance with dag_version
Proposed solution:
Add index ti_dag_version_id on task_instance.dag_version_id
Use case/motivation
We experienced query timeouts because of this issue in our Airflow deployment.
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
Hi @sortega, thanks for the great work on this issue and PR #64311.
I noticed that PR has been closed due to inactivity for over a month. I'd like to pick this up and address the remaining items.
If you're still planning to continue working on this, please let me know and I'll defer to you — otherwise, I'll proceed with a new PR that builds on your implementation.
Adding a note here for anyone else looking into these issues - the task_instance.dag_version_id index was added in #64818, and released as a part of 3.3.0.
Activity
potiuk commentedon Mar 2, 2026
@sortega We are unassigning you from this issue as part of our updated assignment policy.
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
sortega commentedon Mar 27, 2026
I'm working on it
kir-rin commentedon May 17, 2026
Hi @sortega, thanks for the great work on this issue and PR #64311.
I noticed that PR has been closed due to inactivity for over a month. I'd like to pick this up and address the remaining items.
If you're still planning to continue working on this, please let me know and I'll defer to you — otherwise, I'll proceed with a new PR that builds on your implementation.
SamWheating commentedon Sep 15, 2026
Adding a note here for anyone else looking into these issues - the
task_instance.dag_version_idindex was added in #64818, and released as a part of 3.3.0.