Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-3352

Join hints not honored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • COMP - Compiler

    Description

      For the following query, the join hints are not honored.

      select 061, count(1) from R join S
      on int64_default_null (R.u64) /+ indexnl */ /+ productivity R 65536.0 */ = int64_default_null (S.u64)
      join T on int64_default_null (S.u256) /+ hashjoin build (S) */ /+ productivity S 16384.0 */ = int64_default_null (T.u256)
      where R.rand /*+ selectivity 0.000015258789063 */ <= 64
      and S.rand /*+ selectivity 0.000003814697266 */ <= 16
      and T.rand /*+ selectivity 0.000003814697266 */ <= 16;

      Upon debugging, I see that the hints are being used during plan enumeration, but another plan which uses one of the hints (but not both hints), is costed cheaper and is picked. The fix would be to favor plans that use more hints when comparing two plans irrespective of cost.

      Attachments

        Activity

          People

            vsarathy1 Vijay Sarathy
            vsarathy1 Vijay Sarathy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: