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

query using IntersectScan vs UnionScan

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

       

      CREATE INDEX ix1 ON default (c1, c2, cdate) WHERE type = "doc";
      CREATE INDEX ix2 ON default (c1, c2, c3, ldate DESC) WHERE type = "doc";
      

       

      EXPLAIN SELECT *
      FROM default
      WHERE type = "doc"
            AND c1 = 10
            AND ( c3 = "abc" OR c2 = "xyz" )
      ORDER BY ldate DESC
      LIMIT 150;
      

      Why this query uses IntersectScan in 7.1.3  vs UninonScan in 6.5.1

      IntersectScan can perform poorly.

      CREATE INDEX ix3 ON default(c1, ldate DESC, c2, c3 ) WHERE type = "doc";

      With Above index in 7.1.3 it using OrderedIntersectScan. Is it possible to use ix3 only in RBO

      Attachments

        Issue Links

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

          Activity

            People

              Sitaram.Vemulapalli Sitaram Vemulapalli
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty