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

Plan difference between cbas and *DB

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      While working on MB-55865, I noticed that the bug only happened while running the cbas code and did not happen while running in *DB.

      The following query (with CBO turned off) produced an "inapplicable hash join hint" warning on cbas, but not on *DB.

      SELECT COUNT(DISTINCT n.n_name) FROM customer c JOIN nation n
      ON c.c_nationkey /*+ hashjoin build (n) */ = n.n_nationkey;
      

      On debugging further, I saw that on the cbas side (running from the cbas gui), the join has projects on both sides, so varsRight in JoinUtils::setJoinAlgorithmAndExchangeAlgo() does not have $n and we generate the warning saying cannot build with n.
      On the asterix side, (running from *DB gui and our test framework), there are no projects, so we see $n in the varsRight, so no warning is generated as we can build with n.

      Attachments

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

        Activity

          People

            vijay.sarathy Vijay Sarathy
            vijay.sarathy Vijay Sarathy
            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