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

[BP to 7.1.5/7.2.1 MB-57666] - CBO: optimizer incorrectly pick index with early order unconditionally

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      When CBO considers intersect scan from multiple indexes, it currently always pick an index with either order pushdown or early order. For order pushdown this is ok since we only do order pushdown if index has exact spans (no false positives). For early order we should not always prefer an index with early order, since it is possible that there are additional filters that can filter out results from the index scan, and we could have another more selective index that can be used.

       

      Issue Resolution
      When appropriate optimizer statistics were used in Cost-Based Optimizer (CBO), for a query with ORDER BY, if there were multiple indexes available for the query, CBO unconditionally favored an index that provided ordering. Such indexes were not always the best ones to use. CBO now allows cost-based comparison of indexes.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              bingjie.miao Bingjie Miao
              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