| Bug #43626 | Profiling information is wrong | ||
|---|---|---|---|
| Submitted: | 13 Mar 2009 9:42 | Modified: | 30 Apr 2009 16:21 |
| Reporter: | Cyril SCETBON | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 5.0.77 | OS: | Linux (debian etch) |
| Assigned to: | Paul DuBois | CPU Architecture: | Any |
| Tags: | error, profiling | ||
[13 Mar 2009 9:42]
Cyril SCETBON
[13 Mar 2009 13:57]
Valeriy Kravchuk
Sorry, but what is the problem from your point of view? Statement running for 2.22 seconds while 2.23 seconds were spent "Sending data" or something else?
[13 Mar 2009 14:07]
Cyril SCETBON
As the Server is returning 0 rows to the client, why does it takes 2.23s to Send data ?? I think that should be 2.23s in executing, and if it's really in "Sending data" what's happening ?
[13 Mar 2009 14:19]
Valeriy Kravchuk
http://dev.mysql.com/doc/refman/5.0/en/general-thread-states.html says: "- Sending data The thread is processing rows for a SELECT statement and also is sending data to the client." Why do you take last part into account but not the first one? The thread was processing rows, and based on EXPLAIN results it had to process a lot of rows to find out than none of them satify the query. Even waiting for a row lock for InnoDB table will be a part of "Sending data". I think this is not a bug.
[13 Mar 2009 14:24]
Cyril SCETBON
"- Sending data The thread is processing rows for a SELECT statement and also is sending data to the client." When I read this, I understand it must satisfy both conditions : - processing rows AND - sending data If you're right and processing rows which are not sent is included in "Sending data" statistics, what's the counter executing ? processing with functions ? or something else ?
[13 Mar 2009 14:43]
Valeriy Kravchuk
For exact information of what "Executing" and "Sending data" means, please, look at the code of sql/sql_select.cc. As far as I can see, "executing" state thread enters in JOIN::exec() function, that is, at the beginning of query execution. Then it can change state to "Sending data", "Copying to temp table" etc, depending on the execution path. Indeed, all these should be documented in much more details for SHOW PROFILE and/or SHOW PROCESSLIST. This is a valid documentation request.
[13 Mar 2009 15:00]
Cyril SCETBON
good.
[30 Apr 2009 16:21]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products. I don't see that there's much to do here, except add "executing" to the list of thread states.
