Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
Docs Required, Release Notes Required
Description
Globally it works the same way as in https://ignite.apache.org/docs/latest/SQL/sql-calcite#force_index-no_index, but has some difference when FORCE_INDEX and NO_INDEX used together in the same query.
When both hints reference to the same index - it is invalid case. SQL is declarative language and we shouldn't expect hints collection is ordered:
SELECT /*+ FORCE_INDEX(IDX_ID), NO_INDEX */ * FROM TBL1 WHERE id = ? AND val = ? OR SELECT /*+ NO_INDEX(IDX_VAL), FORCE_INDEX(IDX_VAL) */ * FROM TBL1 WHERE val = ?
What to do
We need to fix example section and rewrite "Hint Scope" section.
Attachments
Issue Links
- relates to
-
IGNITE-21278 Add FORCE_INDEX/NO_INDEX hints for calcite engine
- Resolved