35 words, 1 min read
Instead of using
COUNT(*)to find users without addresses, useNOT EXISTSfor better performance.COUNT(*)unnecessarily counts all rows before rejecting them, whileNOT EXISTSstops checking as soon as a match is found.
continue reading onwww.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.