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

Index advisor suggesting a non-optimal index

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      https://forums.couchbase.com/t/index-advisor-suggesting-a-non-optimal-index/28484

      SELECT * FROM example WHERE META().id > "2ebf1fe2-a5b3-48dd-a5e5-051958f81902" AND _class = "org.example.Example" ORDER BY META().id ASC LIMIT 1000

      The index advisor is advising an index that looks like this:

      CREATE INDEX adv_class ON example(_class)

      With the advised index the query takes 10s+ with some 600k documents.

      with a manually created index

      CREATE INDEX manual_index ON example(_class,(meta().id))

      the query takes only around 50ms. Why does the index advisor suggest such index?

      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
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty