Kamil Bregula created AIRFLOW-6964:
--------------------------------------
Summary: create_dag_run method queries individual values from the
database
Key: AIRFLOW-6964
URL: https://issues.apache.org/jira/browse/AIRFLOW-6964
Project: Apache Airflow
Issue Type: Improvement
Components: scheduler
Affects Versions: 1.10.9
Reporter: Kamil Bregula
Hello,
First query:
[https://github.com/apache/airflow/blob/cc562dd/airflow/jobs/scheduler_job.py#L547-L556]
Second query:
[https://github.com/apache/airflow/blob/cc562dd/airflow/jobs/scheduler_job.py#L596]
Method A is performed for each Dag in the file. This results in the fact that
we have the n + 1 problem
We should replace it with two bulk queries. This will improve performance and
allow us to keep a constant number of database queries regardless of the number
of DAGs in a single file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)