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

Allow DISTINCT aggregates pushdown if partition keys are equal

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 7.0.2, 7.1.0
    • 6.6.3, 7.0.0, 7.1.0
    • query
    • 1

    Description

      CREATE INDEX ix1 ON default(c1,c2,c3,c4) PARTITION BY HASH(c1,c3);
       
      SELECT COUNT(DISTINCT d.c2)
      FROM default AS d
      WHERE d.c1 = 5 AND d.c3 = 7 AND d.c2 IS NOT NULL and d.c4 BETWEEN 10 AND 20;
      

      In above case HASH on c1,c3 AND equality predicate i.e. it will resolve single partition (All partition keys must be equality predicates), So treat this same as non partition index and apply same rules.

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            Sitaram.Vemulapalli Sitaram Vemulapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty