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

[ANSI JOIN] array query hangs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.5.0
    • 5.5.0
    • query
    • 5.5.0-1766
    • Untriaged
    • 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

            bingjie.miao Bingjie Miao added a comment -

            See my comment in MB-27763.

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

            Verified in 5.5.0-2314. 

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

            People

              ajay.bhullar Ajay Bhullar
              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