I have a inicial query return status:
/* 0 rows affected, 4,991 rows found. Duration for 1 query: 0.717 sec. (+ 12.714 sec. network) */
Optimizing tables with indexes, I got to the same query:
/* 0 rows affected, 4,991 rows found. Duration for 1 query: 0.078 sec. (+ 1.779 sec. network) */
I have exactly the same query, the same number of records and columns and the data also are exactly identical. Why I got decremented so much the network time?
Thanks a lot!
Marcio
Different network times with queries that return the same data
My educated guess is that indexes allow faster row retrieval in your case. The manual seems to suggest the possibility:
http://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html
http://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html
I'm having serious difficulties in understanding your exact doubt, really. When you send a SELECT query to the MySQL server, it does two things (among others):
1. Identify and sort the rows that belong to the result set.
2. Extract from the database the appropriate columns for those rows and get them sent to the client.
I don't know where HeidiSQL grabs the figures from, but the MySQL server provides the execution time for those both steps. The important bit is that the "network time" counter probably starts counting when the first row is about to be sent and stops when the last one has been sent——it does not pause every microsecond when the network card is not physically transmitting bytes——it does not pause when the client requests next row and waits for the server to acknowledge.
If you made a road trip from 9:00 to 12:00 it took three hours, even if you were having lunch from 10:00 to 11:00.
1. Identify and sort the rows that belong to the result set.
2. Extract from the database the appropriate columns for those rows and get them sent to the client.
I don't know where HeidiSQL grabs the figures from, but the MySQL server provides the execution time for those both steps. The important bit is that the "network time" counter probably starts counting when the first row is about to be sent and stops when the last one has been sent——it does not pause every microsecond when the network card is not physically transmitting bytes——it does not pause when the client requests next row and waits for the server to acknowledge.
If you made a road trip from 9:00 to 12:00 it took three hours, even if you were having lunch from 10:00 to 11:00.
Please login to leave a reply, or register at first.