I am using an InnoDB table that currently has 16m of records. When I run the following query by using MySQL Workbench, it returns in about 14 seconds:
SELECT countryCode AS label, SUM(count) AS value
FROM AnalyticsPieCharts
GROUP BY label
ORDER BY value DESC;
When I run the same query from a different computer, while the first one is running, both return in about 23-24 seconds.
I haven't created any indexes (except of the primary key) or put transaction rules. I am using Amazon RDS.
Do you have any clue on what could be the problem?