vchiapaikeo commented on PR #40695: URL: https://github.com/apache/airflow/pull/40695#issuecomment-2225971152
So I tried to fix [the query](https://github.com/apache/airflow/blob/main/airflow/models/trigger.py#L306-L314) (which I thought would be a better, simpler solution) to use a left join but actually, Postgres does not allow row locks with a left join. On our sandbox MySQL instance where we have ~3M task_instances, this is producing the correct explain plan now. Full table scan on trigger table instead of task_instance table:  Previously, it was doing the full table scan on the task_instance table:  -- 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]
