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

Community Edition should have a HASH Join warning message

    XMLWordPrintable

Details

    Description

      Summary: HASH join in N1QL is not supported in Community Edition. Currently, it falls back to Nested Loop silently, which could be frustrating.

      Repro:

      1. Open up Query Workbench in Community Edition (I used build 2473)
      2. Enter a query that uses HASH join, for instance: SELECT l.name AS landmarkName, h.name AS hotelName, l.email AS landmarkEmail, h.email AS hotelEmail
        FROM `travel-sample` l
        INNER JOIN `travel-sample` h USE HASH(BUILD) ON h.email = l.email
        WHERE l.type = 'landmark'
        AND h.type = 'hotel'
        limit 10;
      3. Execute query. Or alternatively, click "Plan" or "Plan Text"

      Actual:

      Query attempts to run, but will likely be very slow and/or timeout because it's falling back to Nested Loop (and there may not be adequate indexing).

      Expected/Suggested:

      A warning icon shows in the Query Editor when attempting to use HASH join (see screenshot)

      and/or

      A warning icon shown in the Plan visualization that indicates that a Nested Loop Join is being used because HASH join is not supported in Community.

      Attachments

        1. Hash_join_hint_not_followed_in_explain.png
          Hash_join_hint_not_followed_in_explain.png
          172 kB
        2. suggested1.png
          suggested1.png
          30 kB
        3. suggested2.png
          suggested2.png
          15 kB
        4. suggested3.png
          suggested3.png
          51 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            eben Eben Haber
            matthew.groves Matthew Groves
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty