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

Push down ORDER BY with array indexing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.5.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      The following scenario should push down the ORDER BY to the index.

      CREATE INDEX idx_age ON default(age, DISTINCT ARRAY name FOR name IN names END, names );

      EXPLAIN SELECT META().id
      FROM default
      WHERE age IS NOT NULL AND ANY name IN names SATISFIES name LIKE 'test%' END
      ORDER BY age
      LIMIT 30 OFFSET 0;

      This was raised by a user as a high priority:

      https://forums.couchbase.com/t/couchbase-4-5-indexscancounter-missing-for-array-indexing/8139/5

      Attachments

        For Gerrit Dashboard: MB-19631
        # Subject Branch Project Status CR V

        Activity

          People

            korrigan.clark Korrigan Clark (Inactive)
            gerald Gerald Sangudi (Inactive)
            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