pierrejeambrun opened a new issue, #62025:
URL: https://github.com/apache/airflow/issues/62025

   On big installation the "get_dag_runs" endpoint 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 rows explosion. We need to optimize the query, most 
likely by double checking the eager loading options and verify that there is no 
row explosion (joinedload vs selectinload) cause by a wrong option. Also we can 
add `load_only` to limit the number of columns selected in each joins.
   
   
   
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.
   
   
https://github.com/user-attachments/assets/43505ed2-fef8-45f3-9865-78a1f32509dc
   
   ### 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]

Reply via email to