Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Our implementation of optimizer hints is intended to bring compatibility with the corresponding functionality of MySQL, which is described here.
Currently we have implemented a partial subset of the hints:
- 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;
- SEMIJOIN() and NO_SEMIJOIN() for semijoin strategy control;
- SUBQUERY() for control of subquery execution strategy.
Examples of applying hints to SQL statements can be found at
mysql-test/main/opt_hints.test; mysql-test/main/opt_hint_timeout.test; mysql-test/main/opt_hints_subquery.test
|
Attachments
Issue Links
- split from
-
MDEV-33281 Implement optimizer hints like in MySQL 8
-
- In Progress
-
Requirement from this worklog are generally applicable and may be used for testing.
Functional requirements:
Some key ideas:
The syntax will be /*+ */
MariaDB already supports some hints(USE|FORCE|IGNORE INDEX). They should comply with new style hints. For example,
Hints above are conflicting and hints in old style should be ignored with warning. There won't be any change of the old
style hints processing. We just add verification procedure of the result of old style hint processing and new style hints.
For example, for INDEX hints it's TABLE_LIST::process_index_hints() procedure. This procedure sets various key maps according to old style hints. New procedure which verifies populated key maps with new style hints could be added there.
Note: Will be implemented in separate WL.
For instance, BKA/NO_BKA hint: