Dandandan commented on issue #8777:
URL: 
https://github.com/apache/arrow-datafusion/issues/8777#issuecomment-1880648668

   * It would be very nice if this could be generalized to equivalent 
subqueries (i.e. already expanded CTEs or subqueries that have the same result) 
instead of CTEs.
   * PostgreSQL has the hint `[NOT] MATERIALIZED` to force / disable CTE 
materialization. Often it's much faster to disable materialization, as 
otherwise pushdown / CBO optimizations will not apply (as you suggested).
   
https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-CTE-MATERIALIZATION
   


-- 
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