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

request_plus range queries with LIMIT are slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.0.0
    • 5.0.0
    • query
    • 4 data nodes, 1 query node, 1 index node

    Description

      Query:

      SELECT name, email FROM `bucket-1` WHERE capped_small > $1 ORDER BY capped_small LIMIT 10;
      

      Index:

      CREATE INDEX by_capped_small ON `bucket-1`(capped_small);
      

      There are 20M documents in the database.

      The rate of not_bounded queries is rather high. We can achieve to up 18K queries/sec in Spock.

      But if I change scan_consistency from not_bounded to request_plus, the throughput drops to ~100 in 4.6 and ~700 in Spock. Spock results are almost as bad as 4.5.0 numbers.

      From graphs I can see that cbq-engine receives way more items from 2i when scan_consistency is set to request_plus. That results in high CPU and memory usage, and also larger number of KV fetches.

      I wonder if we have any limitation in this area.

      See also http://showfast.sc.couchbase.com/#/timeline/Linux/n1ql/pagination

      Attachments

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

        Activity

          People

            pavelpaulau Pavel Paulau (Inactive)
            pavelpaulau Pavel Paulau (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty