What's wrong with this SQL cache miss?

What's wrong with this SQL cache miss in a quota service. The SQL layer treats zero as false and refetches on every call. In SQL backed APIs this causes unnecessary load and latency.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlcachebug #sqlfalsey #sqlquota #sqldatabaseload #...

https://www.youtube.com/watch?v=_sNJA7CGWbk

Whats wrong with this SQL cache miss? #whatswrongwiththissqlquery

YouTube