hussein-awala opened a new pull request, #38663: URL: https://github.com/apache/airflow/pull/38663
This PR improves the performance of `clean_unsed` triggers method by executing the cleanup for Postgres and SQLite in a single query, which could reduce the latency and memory usage. For MySQL, it doesn't support DELETE with JOIN, so we need to keep the current behavior: ``` [SQL: DELETE FROM `trigger` WHERE `trigger`.id IN (SELECT `trigger`.id FROM `trigger` LEFT OUTER JOIN task_instance ON `trigger`.id = task_instance.trigger_id GROUP BY `trigger`.id HAVING count(task_instance.trigger_id) = %s)] [parameters: (0,)] (Background on this error at: https://sqlalche.me/e/14/e3q8) ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org