2 ms·
CTEs are how you compose SQL. I don't quite like how the same CTE lives in 60 different places in my codebase, but at least the WITH clause changed things for
by gopalv 1mo ago
CTEs are how you compose SQL.
I don't quite like how the same CTE lives in 60 different places in my codebase, but at least the WITH clause changed things for me.
Also really liked Snowflake's result_scan for composing chains, mostly because I don't rerun expensive parts again and again. You can use ->> as a shortcut, but I don't think it uses results caching internally to skip waiting for them to all re-run & actually optimizes the whole thing.
- vrighter 1mo agoyou create one view and have the ctes query that, to deduplicate the implementation