Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-21416

Add documentation for FORCE_INDEX/NO_INDEX hints

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • documentation, sql

    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

          Activity

            People

              Unassigned Unassigned
              anovikov Andrey Novikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: