๐๐ฎ๐๐ฎ, ๐๐ป๐ฎ๐น๐๐๐ถ๐ฐ๐ & ๐๐. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
Currently materialized CTEs reside fully in memory with no disk spilling capability. This means that if the CTE youโre materializing is larger than your configured query memory limit you will get a memory limit exceeded error.
The only current option to work around this while retaining the performance benefits of materialized CTEs is to pull the CTE into a create transient table โฆ which is created before you run the query.
It would be ideal to have a setting that specifies a memory ratio threshold above which materialized CTEs are converted into temporary tables.
It could be called something like materialized_cte_spilling_memory_ratio to be consistent with the existing aggregate_spilling_memory_ratio and join_spilling_memory_ratio settings.
Currently materialized CTEs reside fully in memory with no disk spilling capability. This means that if the CTE youโre materializing is larger than your configured query memory limit you will get a memory limit exceeded error.
The only current option to work around this while retaining the performance benefits of materialized CTEs is to pull the CTE into a
create transient table โฆ
which is created before you run the query.It would be ideal to have a setting that specifies a memory ratio threshold above which materialized CTEs are converted into temporary tables.
It could be called something like
materialized_cte_spilling_memory_ratio
to be consistent with the existingaggregate_spilling_memory_ratio
andjoin_spilling_memory_ratio
settings.