"Sending data" taking too much time (no replies)

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
Submitted by programmer on Thu, 08/14/2008 - 10:38.

We have been in the process of trying to profile a couple of SQL queries that were taking 6-7 sec. The result from the MySQL profiler looks like this:

+--------------------+-----------+----------+------------+

| Status | Duration | CPU_user | CPU_system |

+--------------------+-----------+----------+------------+

| (initialization) | 0.0000012 | NULL | NULL |

| Opening tables | 0.0000277 | NULL | NULL |

| System lock | 0.000004 | NULL | NULL |

| Table lock | 0.0000062 | NULL | NULL |

| init | 0.0000212 | NULL | NULL |

| optimizing | 0.0000074 | NULL | NULL |

| statistics | 0.000012 | NULL | NULL |

| preparing | 0.000011 | NULL | NULL |

| executing | 0.0000027 | NULL | NULL |

| Sending data | 6.9561519 | NULL | NULL |

| end | 0.0000062 | NULL | NULL |

| query end | 0.0000037 | NULL | NULL |

| freeing items | 0.000007 | NULL | NULL |

| closing tables | 0.001863 | NULL | NULL |

| logging slow query | 0.0000875 | NULL | NULL |

+--------------------+-----------+----------+------------+

15 rows in set (0.00 sec)

What does "sending data" here mean? And what should be tuned to reduce this?

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.