If you have worked with an RDBMS for some time, you will likely
have come across the statement SELECT 1
.
However, rarely is it correctly explained to engineers what the origin of SELECT 1 is, and why it’s useless and wasteful? A google search is not going to give you the response you would hope, these ranked responses are just as useless as the statement itself.
Bloat
Seeing a SELECT 1
confirms two things. First you are
using a generic ORM framework, quote, and second, you have never optimized your
SQL traffic patterns.
“Frameworks generally suck.
They CLAIM to improve the speed of development and abstract the
need to know SQL.
The REALITY is the undocumented cost to sub-optimal performance,
especially with data persistence.”
Connection Pooling
SELECT 1
comes from …