Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-51737

Support negative optimizer hints

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Morpheus
    • Morpheus
    • query
    • None
    • 1

    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

          For Gerrit Dashboard: MB-51737
          # Subject Branch Project Status CR V

          Activity

            People

              ajay.bhullar Ajay Bhullar
              bingjie.miao Bingjie Miao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty