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

Flex Index ORDER BY pushdown for pagination

    XMLWordPrintable

Details

    • 1

    Description

      SELECT t.*
      FROM default AS t USE INDEX (USING FTS)
      WHERE t.type = "order"
            AND t.product IN ["p0", "p5", "p10", "p15"]
      ORDER BY t.otime
      OFFSET 10
      LIMIT 20;

      Above one Pagination Query. 

      • Flex Index able to handle ORDER, Offset, Limit (when order fields are available)
      • As it is not covered it if Flex Index handles it can produce only 20 documents avoid unnecessary Fetch.

      TBD:

      • How far can we go?
      • Example: Even predicate is not exact (offset and limit) present can we use FTS ORDER and not push limit, offset because Fetch expensive. At the same time sort size might be more?  Keshav Murthy need your input.

       

      Attachments

        Issue Links

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

          Activity

            People

              girish.benakappa Girish Benakappa
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  PagerDuty