15 ms·
The part that has stood the test of time and genuinely seems to carve reality at the seams is the query part. The data definition and data manipulation parts ar
by closeparen 1mo ago
The part that has stood the test of time and genuinely seems to carve reality at the seams is the query part. The data definition and data manipulation parts are just ok.
- senderista 1mo agoThe problem with the query part is that query fragments aren't composable.
- gopalv 1mo agoCTEs 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
- jasomill 1mo agoEven so, "FROM t SELECT t.foo, …" has an ergonomic advantage over "SELECT t.foo, … FROM t" in that editors can autocomplete column names without needing to backtrack while editing. IIRC, this is why C# query syntax uses the former.