29.05.2016, 16:23
If the only purpose of a query is to get a count of something then the COUNT() aggregate function should be used. Sending over a single value is obviously much faster than sending over an entire result set which isn't going to be used.