pierrejeambrun opened a new issue, #62025: URL: https://github.com/apache/airflow/issues/62025
### Body On big installation the "get_dag_runs" to list all the dagruns in the UI is taking a long time to return a response. The critical part of the code is the actual db query. Most likely due to the number of joins creating row explosion. We need to optimize the query, most likely by double checking the eager loading options and verify that there is no row explosion cause by a wrong option. Also we can add `load_only` to limit the number of columns joined. https://github.com/apache/airflow/blob/4e75919198be6b8e4d3ac52656a9b74e0e73b097/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py#L387-L421 Also needs investigation to check if an extra index could help. ### Committer - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project. -- 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]
