Comment by Kinrany
7 hours ago
One query isn't cheaper than two queries that do the same amount of IO and processing and operate in the same memory space
7 hours ago
One query isn't cheaper than two queries that do the same amount of IO and processing and operate in the same memory space
Yes, (index) scans are rarely faster typical web apps.
Unless you have toy amounts data... or doing batch operations which is not typical (and can be problematic for other transactions due to locking, etc...)