PolitePp opened a new pull request, #72359: URL: https://github.com/apache/airflow/pull/72359
Optimize query performance for `ti.get_previous_ti` This PR addresses a performance issue on the Airflow API side when fetching the previous task instance. Previously, the query behind `ti.get_previous_ti` could execute a large `SELECT` statement that pulled more records than necessary before filtering. By appending `.limit(1)` to the query, we ensure the database only returns the single required record, significantly reducing database load and preventing potential memory/performance bottlenecks in the API. * closes: #72358 ##### Was generative AI tooling used to co-author this PR? - No -- 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]
