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

Early order not done when there are extra predicates

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes

    Description

      When a query has predicates on non-index keys, early order is not performed causing performance regressions.

      Repro:

      CREATE INDEX ix10 ON default(c1,c2,c3,c4 DESC);
       
      SELECT d.*
      FROM default AS d
      WHERE c1 = "doc"
          AND c2 = "hello"
          AND ANY v IN a1 SATISFIES v.ac1 END
      ORDER BY c4 DESC
      LIMIT 20
      OFFSET 0;
      

      In 7.1 we can do early order but in 7.2.3 and later we no longer do that, due to the presence of the ANY clause.

      Attachments

        Issue Links

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              bingjie.miao Bingjie Miao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty