AutomationDev85 opened a new pull request, #69038: URL: https://github.com/apache/airflow/pull/69038
# Overview We are currently using Airflow 3.2.2 and have run into the following issue: We operate an Airflow instance with 45 triggerers, and our database reached 100% CPU utilization. We identified that the high load was caused by two queries originating from the trigger model: * https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/models/trigger.py#L348 * https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/models/trigger.py#L388 The high CPU load occurred because these queries resulted in full table scans. To address this, we added the following index: * `CREATE INDEX idx_trigger_triggerer_queue_id ON public.trigger USING btree (triggerer_id, queue, id)` CPU utilization dropped immediately after adding the index. What do you think about this solution? I’m looking forward to your feedback. # Details of change: * Add index to solve DB performance issue. -- 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]
