MySQL 5.5
I am trying improve speed on this query:
SELECT * FROM `core_table` WHERE `id` = '57' AND `model` IN (SELECT `new_models` FROM `raw_table`)
I tried to benchmark it in phpMyAdmin by running:
SELECT SQL_NO_CACHE * FROM `core_table` WHERE `id` = '57' AND `model` IN (SELECT `new_models` FROM `raw_table`)
According to MySQL slow log: Query_time: 1174.17, Rows_sent: 1 Rows_examined: 3006660068
phpMyAdmin says "Query took 0.0024 sec" which is completely false. It took 20 minutes.
Why does phpMyAdmin report an egregiously false value? Is this a fixable bug or should I just ignore phpMyAdmin query times forever?
EDIT 2015-04-30:
It's been awhile and I'm coming back to this because someone finally posted an answer. I seem to remember finding a possible reason for this myself. I believe it was that phpMyAdmin runs a second query, I can't remember for certain which one, and reports the query time for that query instead of for the one it seems to be reporting on. I.E. perhaps even doing a SHOW TABLES
query or something like that. But I don't have time to look into it right now.
Ali's answer is not correct, because as I mentioned, the MySQL slow log reports the time as 20 minutes, so this isn't a browser rendering issue.