[Join Optimization] Decide what optimizer should do with allowDiskUse flag

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When discussing what to do with SERVER-131472, the team decided that if the optimizer does not consult the allowDiskUse flag to make an optimization decision, then the flag should not be encoded in the cache key, but if it does, then it should be encoded in the cache key.

      This ticket is tracking whether the optimizer should consult this bit during plan enumeration. Some potential options are:

      • Avoid enumerating HJs when allowDiskUse=false
      • Estimate whether HJ is will spill and avoid enumerating joins that we predict will spill when allowDiskUse=false
      • Ignore this bit and have the query fail at runtime if a HJ is enumerated and it spills

            Assignee:
            Unassigned
            Reporter:
            Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: