Repository navigation
Conversation
Add index ti_dag_version_id on task_instance.dag_version_id column to improve query performance. The column was added in migration 0047 but no index was created, causing full table scans when filtering by dag_version_id. closes apache#60883
sortega
force-pushed
the
sortega/add-index-ti-dag-version-id
branch
from
January 22, 2026 11:09
db30951 to
55c9004
Compare
sortega
force-pushed
the
sortega/add-index-ti-dag-version-id
branch
from
January 22, 2026 13:15
55c9004 to
ebb317d
Compare
Contributor
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
1 task done
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.
Add index
ti_dag_version_idontask_instance.dag_version_idcolumn to improve query performance.The
dag_version_idcolumn was added in migration0047_3_0_0_add_dag_versioning.pybut no index was created, causing full table scans when filtering or joining on this column. This affects:/ui/dags/{dag_id}/grid/...) filtering task instances bydag_version_idtask_instancewithdag_versionNote on MySQL: The downgrade skips dropping the index on MySQL because MySQL requires an index on FK columns. Since
dag_version_idhas a FK constraint, MySQL will keep using the index for the FK.closes #60883
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines
🤖 Drafted with Claude Code