Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3540

Use cost estimates to reorder compound predicates

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.6.0
    • Fix Version/s: None
    • Component/s: Frontend
    • Labels:

      Description

      Building on the work of IMPALA-2805, we can use the cost and selectivity estimates to reorder conjuncts within a compound predicate, whereas currently we only reorder conjuncts that end up as different exprs.

      For example, in the query:
      select * from tpch.lineitem where (p_container like '%MED%' or p_size = 1) and p_partkey = 0

      Current;y we are able to recognize that 'p_partkey = 0' is cheaper than '(p_container like '%MED%' or p_size = 1)' and switch their order. We could get even more of a speedup by recognizing that 'p_size = 1' is cheaper than 'p_container like '%MED&'' and also reorder them within the compound predicate.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              twmarshall Thomas Tauber-Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: