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

Left nest with limit not showing limit in plan

    XMLWordPrintable

Details

    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      In this test we check that the explain plan has limit = 10 in a certain location in the explain plan:

      self.assertTrue(plan3["~children"][0]["~children"][0]["limit"] == "10")

      index is: 

      CREATE INDEX idx2 ON default ( _id  ) USING GSI

      the query is:

      select * from default b1 left nest default b2 on keys b1._id where b1._id like 'query-testemployee%' limit 10

      the plan is:

      {u'#operator': u'Sequence', u'~children': [{u'#operator': u'Sequence', u'~children': [{u'index': u'idx2', u'namespace': u'default', u'as': u'b1', u'keyspace': u'default', u'#operator': u'IndexScan3', u'index_projection': {u'primary_key': True}, u'spans': [{u'range': [\{u'high': u'"query-testemployef"', u'low': u'"query-testemployee"', u'inclusion': 1}], u'exact': True}], u'using': u'gsi', u'index_id': u'f6644ea3c276c9b4'}, {u'keyspace': u'default', u'#operator': u'Fetch', u'namespace': u'default', u'as': u'b1'}, {u'outer': True, u'namespace': u'default', u'as': u'b2', u'keyspace': u'default', u'#operator': u'Nest', u'on_keys': u'(`b1`.`_id`)'}, {u'#operator': u'Parallel', u'~child': {u'#operator': u'Sequence', u'~children': {u'#operator': u'Filter', u'condition': u'((`b1`.`_id`) like "query-testemployee%")'}, {u'#operator': u'InitialProject', u'result_terms': [{u'expr': u'self', u'star': True}]}, {u'#operator': u'FinalProject'}}}]}, {u'expr': u'10', u'#operator': u'Limit'}]}

       

      relevant part of the plan is:

      {u'index': u'idx2', u'namespace': u'default', u'as': u'b1', u'keyspace': u'default', u'#operator': u'IndexScan3', u'index_projection': {u'primary_key': True}, u'spans': [{u'range': [\{u'high': u'"query-testemployef"', u'low': u'"query-testemployee"', u'inclusion': 1}], u'exact': True}], u'using': u'gsi', u'index_id': u'f6644ea3c276c9b4'}

       

      Maybe this is part of the index3 api changes?

      ./testrunner -i local.ini doc-per-day=6,primary_indx_type=GSI,array_indexing=True -t tuqquery.tuq_2i_index.QueriesIndexTests.test_limit_index,index_type=GSI,array_indexing=True

      Attachments

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

        Activity

          People

            keshav Keshav Murthy
            korrigan.clark Korrigan Clark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty