I realized that using phpMyAdmin for testing the speed of queries might be dumb: it automatically applies a LIMIT
clause.
I tried a certain query on a fairly large number of records (31,595) with a GROUP BY
clause. phpMyAdmin, adding LIMIT 0, 200
, took 0.1556 seconds to fetch the results.
I decided to try the same query from the command line without the LIMIT
clause and it took 0.20 seconds. Great, so now I have the real time it takes for that query.
But the downside is I had to wait for 30,000+ records to print on the screen.
Is there a better solution?
EDIT:
To clarify, I am looking for a way to suppress the screen output of a select query while still getting an accurate time for running the query. And I want it to be something that could be typed in and timed at any time (i.e. I don't want to have to tweak slow log
settings to capture results).