server
server copied to clipboard
Optimizer hints
- [x] The Jira issue number for this PR is: MDEV-33281
Provide the possibility to add optimizer hints to statements in MySQL-compatible format:
SELECT /*+ hint1(s) hint2(s1 s2) */ ... ;
UPDATE /*+ hint(s) */ ... ;
... (SELECT /*+ hint(s) */ ) ...;
Implemented so far:
-
hints for join buffering: BNL(), NO_BNL(), BKA(), NO_BKA(); -
NO_ICP() hint for disabling index condition pushdown; -
MRR(), MO_MRR() hint for multi-range reads control; -
NO_RANGE_OPTIMIZATION() for disabling range optimization; -
QB_NAME() for assigning names for query blocks.
Release Notes
TODO: What should the release notes say about this change? Include any changed system variables, status variables or behaviour. Optionally list any https://mariadb.com/kb/ pages that need changing.
How can this PR be tested?
TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended. Consult the documentation on "Writing good test cases".
If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.
Basing the PR against the correct MariaDB version
- [x] This is a new feature or a refactoring, and the PR is based against the latest MariaDB development branch.
- [ ] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: Olernov
:x: abarkov
You have signed the CLA already but the status is still pending? Let us recheck it.