ObinnaIheanachor commented on issue #62025: URL: https://github.com/apache/airflow/issues/62025#issuecomment-3922587448
I reproduced the slowdown with 200k DagRuns on a single DAG (/api/v2/dags/heavy_dagruns_perf/dagRuns?limit=100) and DB can fetch 100 DagRuns quickly. However pg_stat_activity shows long-running queries hitting task_instance and callback, suggesting the list endpoint triggers heavy relationship loading (likely via eager_load_dag_run_for_validation() / serialization). I’m going to focus on removing row explosion / unnecessary eager loads + adding a regression test that asserts the endpoint doesn’t query TI/callback. If you focus on indexes/EXPLAIN for the dag_id IN (...) case (especially dag_id="~"), we’ll cover both angles without overlap. -- 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]
