-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed interfering force of index. #25404
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
Hmm, this line was actually introduced in #2021 to fix a performance issue in the first place. Unfortunately context is sparse on things this old, but I wonder what changed between then and now that the “normal” case is not slower now—we did change TaskInstance’s primary key in 2.2 to use |
Yeah. I am all for removing such hints, especially that they really work in specific cases and specific problems and specific DB structure which seems to be already way changed since the time it was needed. |
Awesome work, congrats on your first merged pull request! |
(cherry picked from commit 6778503)
Forcing index in mysql dialect causing unnecessary complexity to process the query and adds a lot to the load when DAG executed frequently enough (hourly instead of daily) and having a lot of tasks in it (every additional task increment query time significantly).
Below a few explain plans collected on mysql 8.0.28.
Summary: when range fits in range_optimizer_max_mem_size, optimizer decides to use range scan instead of the optimization provided by hint and request executed fast enough (less than one second in both cases)
Summary: when range DOESN'T fit in range_optimizer_max_mem_size, optimizer follows the hint which produces much more expensive plan than w/o this hint.