Repository navigation
Add indexes on serialized_dag and dag_code - #69391
Conversation
e897e42 to
95a8040
Compare
|
Updated the version to 3.3.1. Given there were already a few 3.4.0 migrations, I had to modify/rename some of the other files in order put it between 3.3.0 and 3.4.0. Also added a test as requested. |
95a8040 to
d2bce90
Compare
|
Would appreciate another review on this. Thanks. |
d2bce90 to
f05d856
Compare
|
@ephraimbuddy any thoughts on this? |
ephraimbuddy
left a comment
There was a problem hiding this comment.
This looks good but I think we should have composite indexes which will be more beneficial in the long run
(dag_id, last_updated) on dagcode and (dag_id, created_at) on serialized_dag
We have queries that actually exercise those paths
f05d856 to
8a14979
Compare
Good call, I've updated them to composite indexes. |
|
This change is more suitable for minor release not patch moving to 3.4.0 |
8a14979 to
a15acd5
Compare
Makes sense. I've updated it to target 3.4.0. |
a15acd5 to
cef6b45
Compare
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker e24f529 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
This PR adds indexes on the dag_id columns of the serialized_dag and dag_code tables. This should avoid full table scans when fetching the latest serialized Dag or Dag code by dag_id.
Note - this a continuation of #64311, which was closed due to inactivity. Thanks to the author for the original implementation.
closes: #60883
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.