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

CBO uses different array expression for histogram generation and selectivity calculation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • query
    • Untriaged
    • 1
    • Unknown

    Description

      For predicate: any i in uarr_i SATISFIES i > 34741 END and norm_i <= 60335
      For index key: DISTINCT ARRAY `i` FOR i in `uarr_i` END

      (distinct (array _usv_1 for _usv_1 in uarr_i end) is used to generate histogram.

      But in selectivity calculation (distinct (`uarr_i`)) is used to look up for histogram, and histogram returns nil.

      update statistics for ks1(DISTINCT ARRAY `i` FOR i in `uarr_i` END) and
      update statistics for ks(DISTINCT uarr_i)
      may need to identify each other and switch when necessary.

      Attachments

        Issue Links

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

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              chang.liu Chang Liu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty