sortega opened a new pull request, #64311: URL: https://github.com/apache/airflow/pull/64311
Add missing database indexes to improve query performance on the metadata DB: - `serialized_dag(dag_id, last_updated)` — speeds up queries fetching the latest serialized DAG per dag_id - `dag_code(dag_id)` — speeds up DAG code lookups by dag_id - `task_instance(dag_version_id)` — speeds up joins/filters on the dag_version_id FK (added in migration 0047 without an index) These indexes resolve full table scan issues observed in production under load. Supersedes #60886 which only covered the `task_instance.dag_version_id` index. closes #60883 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.6) Generated-by: Claude Code (Opus 4.6) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
