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

CBO choosing wrong index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Goldfish GA
    • Goldfish GA
    • analytics
    • Untriaged
    • 0
    • Unknown

    Description

      For the following query, CBO chooses an index intersection plan of the indexes on S.u64 and S.u256. S.u64 is a column with 1..64 unique values, so the predicate S.u64 < 100 is not a good predicate to use the S.u64 index. The plan should only use the index on S.u256

      select * from S where int64_default_null(S.u64) < 100 and int64_default_null(S.u256) = 10;

      Attachments

        Issue Links

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

          Activity

            People

              vijay.sarathy Vijay Sarathy
              vijay.sarathy Vijay Sarathy
              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