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

[ANSI JOIN] array query hangs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.5.0
    • Component/s: query
    • Labels:
    • Environment:
      5.5.0-1766
    • Triage:
      Untriaged
    • Is this a Regression?:
      Unknown

      Description

      The indexes present are:

      default(VMs)

      standard_bucket0(VMs)

       

      This query:

      select * from standard_bucket0 s INNER JOIN default d ON (d.VMs == s.VMs) LIMIT 10

       

      Also hangs with the same datasets I gave you earlier in MB-27763, this may even be the same issue. Basically VMs is an array in the dataset that looks like so:

      "VMs": [
      {
      "RAM": 10,
      "os": "ubuntu",
      "name": "vm_10",
      "memory": 10
      }]

       

      Explain is attached here:

      {
      "plan": {
      "#operator": "Sequence",
      "~children": [
      {
      "#operator": "Sequence",
      "~children": [
      {
      "#operator": "IndexScan3",
      "as": "s",
      "index": "arrays1",
      "index_id": "596ca10a51a354e",
      "index_projection": {
      "primary_key": true
      },
      "keyspace": "standard_bucket0",
      "namespace": "default",
      "spans": [
      {
      "exact": true,
      "range": [
      {
      "inclusion": 0,
      "low": "null"
      }
      ]
      }
      ],
      "using": "gsi"
      },
      {
      "#operator": "Fetch",
      "as": "s",
      "keyspace": "standard_bucket0",
      "namespace": "default"
      },
      {
      "#operator": "Parallel",
      "~child": {
      "#operator": "Sequence",
      "~children": [
      {
      "#operator": "AnsiJoin",
      "alias": "d",
      "on_clause": "((`d`.`VMs`) = (`s`.`VMs`))",
      "~child": {
      "#operator": "Sequence",
      "~children": [
      {
      "#operator": "IndexScan3",
      "ansi_join": true,
      "as": "d",
      "index": "arrays",
      "index_id": "5fec13f1bab1b8f0",
      "index_projection": {
      "primary_key": true
      },
      "keyspace": "default",
      "namespace": "default",
      "spans": [
      {
      "exact": true,
      "range": [
      {
      "high": "(`s`.`VMs`)",
      "inclusion": 3,
      "low": "(`s`.`VMs`)"
      }
      ]
      }
      ],
      "using": "gsi"
      },
      {
      "#operator": "Fetch",
      "ansi_join": true,
      "as": "d",
      "keyspace": "default",
      "namespace": "default"
      }
      ]
      }
      },
      {
      "#operator": "InitialProject",
      "result_terms": [
      {
      "expr": "self",
      "star": true
      }
      ]
      },
      {
      "#operator": "FinalProject"
      }
      ]
      }
      }
      ]
      },
      {
      "#operator": "Limit",
      "expr": "10"
      }
      ]
      },
      "text": "select * from standard_bucket0 s INNER JOIN default d ON (d.VMs == s.VMs) LIMIT 10"
      }

        Attachments

          Issue Links

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

            Activity

            Hide
            bingjie.miao Bingjie Miao added a comment -

            See my comment in MB-27763.

            Show
            bingjie.miao Bingjie Miao added a comment - See my comment in MB-27763 .
            Hide
            ajay.bhullar Ajay Bhullar added a comment -

            Verified in 5.5.0-2314. 

            Show
            ajay.bhullar Ajay Bhullar added a comment - Verified in 5.5.0-2314. 

              People

              • Assignee:
                ajay.bhullar Ajay Bhullar
                Reporter:
                ajay.bhullar Ajay Bhullar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.