We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Instead of using
COUNT(*)
to find users without addresses, useNOT EXISTS
for better performance.COUNT(*)
unnecessarily counts all rows before rejecting them, whileNOT EXISTS
stops checking as soon as a match is found.
continue reading on www.depesz.com
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.