Is there any advantage using "LIMIT 1" with an aggregate function like COUNT or SUM?
In MySQL, is there any advantage (performance or otherwise) using "LIMIT 1" with an aggregate function like COUNT or SUM?
So for instance, is:
SELECT COUNT(colA), COUNT(colB) FROM data_table LIMIT 1;
Better than:
SELECT COUNT(colA), COUNT(colB) FROM data_table;
Other posts I've found haven't considered the aggregate functions.