Closed anasnaeem077 closed 2 years ago
Hello,
Thanks for helping, but COUNT(*) is exactly the same as COUNT(1). It has been tested many times and does not make any difference (https://learnsql.com/blog/difference-between-count-distinct/).
For isUsernameTaken function, SELECT vs SELECT user_id won't increase any performance, but it's a waste of bandwidth as SELECT would need to send more data thru the network (Which isn't the case with docker containers as both API and database are on the same machine).
optimized queries that relevently hit more