alamb commented on issue #1972:
URL: 
https://github.com/apache/arrow-datafusion/issues/1972#issuecomment-1077912042


   One thing I think is missing in this discussion is that the cost models for 
plans are notoriously unreliable (especially one a plan has like 4+ joins in 
it) and suffer from well known, but unsolved problems like predicate 
correlation, data skew, and others. 
   
   So in other words, even if we had some super advanced optimization framework 
that could find the "lowest cost plan" it may turn out to be a very poor plan 
in practice (I spent many years working on an industrial query optimizer -- 
link below for some flavor). Real optimizers tend to have heuristics to 
constrain the search space and try (very) hard to avoid disaster plans / join 
orders. 
   
   Applying more optimizations at the physical level makes sense to me
   
   https://ieeexplore.ieee.org/document/6816727/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to