Description
Support negative hints in relational-style optimizer hints.
The following hints will be supported:
NO_INDEX(keyspace <optional list of indexes>)
|
NO_INDEX_FTS(keyspace <optional list of indexes>)
|
NO_USE_HASH(<list of keyspaces>)
|
NO_USE_NL(<list of keyspaces>)
|
The NO_INDEX hint is similar in syntax to INDEX hint, except that any index listed is NOT to be considered by the planner.
The NO_INDEX_FTS hint is similar in syntax to INDEX_FTS hint, except that any (fts) index listed is NOT to be considered by the planner.
The NO_USE_HASH hint is similar to USE_HASH hint, with one difference: in USE_HASH hint, you can optionally specify a '/BUILD' or '/PROBE' option for each keyspace. This is not available in NO_USE_HASH hint. Only keyspace name is allowed. The planner will NOT consider hash join for any keyspace listed in NO_USE_HASH hint.
The NO_USE_NL hint is similar to USE_NL hint. The planner will NOT consider nested-loop join for any keyspace listed in NO_USE_NL hint.
In addition to the NO_ and NO_USE_ version of negative optimizer hints, we also allow AVOID_ variant as an alias:
AVOID_INDEX: same as NO_INDEX
|
AVOID_INDEX_FTS: same as NO_INDEX_FTS
|
AVOID_NL: same as NO_USE_NL
|
AVOID_HASH: same as NO_USE_HASH
|
Attachments
Issue Links
- causes
-
MB-52018 [Flex] valid Flex index not sargable for flex query
- Resolved
For Gerrit Dashboard: MB-51737 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
173296,2 | MB-51737 Support negative optimizer hints | master | query | Status: MERGED | +2 | +1 |
173297,2 | MB-51737 Support negative optimizer hints | master | query-ee | Status: MERGED | +2 | +1 |
173375,2 | MB-51737 Allow AVOID_ variant as negative optimizer hints | master | query | Status: MERGED | +2 | +1 |
174059,2 | MB-51737 Additional optimizer hint changes | master | query | Status: MERGED | +2 | +1 |