4 ms·
You can write loops in (the procedural extensions of) SQL, but IME it's very rare that you'd want to. The bigger issue is the lack of performant abstractions -
by tfehring 6y ago
You can write loops in (the procedural extensions of) SQL, but IME it's very rare that you'd want to.
The bigger issue is the lack of performant abstractions - I copy-paste orders of magnitude more code in SQL than in any other language I've used. There are basically just views and functions, and both can carry substantial (read: multiple orders of magnitude) performance penalties compared to the copy-paste approach, especially when you try to nest or compose them. Materialized views rectify this somewhat but they come with various RDBMS-specific limitations and gotchas.