MySQL query result: What does the time shown mean?

221
December 19, 2017, at 8:56 PM

I am running some MySQL queries from a shell. At the end of the query result, MySQL prints the total number of rows in the result and a time duration.

mysql>select * from mytable;
[Query result here]
1000000 rows in set (1.50 sec)

What does the 1.50 sec mean? From my trials, I understood it is not the total query duration. Is it the query processing time within the database engine? Or something else?

Answer 1

It is a period of time between start_timer and mysql_end_timer calls within a function that executes your query. As I understand, it is the time spent on the preparation of the result set on the server side, before you started to fetch the result set from the server.

There is a similar question and the answer with links on the neighbor site: https://dba.stackexchange.com/a/72076/16185.

Rent Charter Buses Company
READ ALSO
SUM GROUP BY with subqueries over multiple tables

SUM GROUP BY with subqueries over multiple tables

I have to solve a Problem related to MySQL queries for a project I actually develop

150
SQL max with additional column

SQL max with additional column

I want to select a latest record from MySQL table using MAXDate column that I apply MAX to is selected properly, but second column the ID is not

231
mysqlclient-python & security issues

mysqlclient-python & security issues

I can't figure out whether I'll bear any risk in terms of malicious software & security if I download mysqlclient-python from here https://pypipython

214