News for hackers. Stuff that matters.
Re:Boolean short circuiting is not guaranteed in SQL by karmakaze on Monday December 10, 2018 @10:16PM (#18653112)
It's much better to think of SQL like math, as in sets and commutative operations than as a procedural language. And always use EXPLAIN to spot check performance assumptions, realizing that even then that can vary with data or usage.

I usually find the opposite surprising, when I write an expression and the query planner hasn't re-arranged what I wrote into whatever it thought was best based on available indexes and gathered statistics.

Re:Boolean short circuiting is not guaranteed in SQL by throwaway5250 on Monday December 10, 2018 @05:03PM (#18651529)
Indeed, SQL is a declarative language. It'd be quite shocking if short circuiting were happening.