svn: /phpdoc/en/trunk/reference/mysqlnd/ stats.xml
| From: | Anthony Bedford | Date: | Mon, 19 Oct 2009 13:50:17 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mysqlnd/ stats.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5166@lists.php.net to get a copy of this message | ||
abedford Mon, 19 Oct 2009 13:50:17 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289749
Log:
Added COM_* statistics.
Changed paths:
U phpdoc/en/trunk/reference/mysqlnd/stats.xml
Modified: phpdoc/en/trunk/reference/mysqlnd/stats.xml
===================================================================
--- phpdoc/en/trunk/reference/mysqlnd/stats.xml 2009-10-19 13:45:11 UTC (rev 289748)
+++ phpdoc/en/trunk/reference/mysqlnd/stats.xml 2009-10-19 13:50:17 UTC (rev 289749)
@@ -956,6 +956,94 @@
</tgroup>
</informaltable>
<para>
+ <emphasis role="bold">COM_* Commands</emphasis>
+ </para>
+ <informaltable>
+ <tgroup cols="4">
+ <colspec colwidth="10%"/>
+ <colspec colwidth="10%"/>
+ <colspec colwidth="40%"/>
+ <colspec colwidth="40%"/>
+ <thead>
+ <row>
+ <entry>Statistic</entry>
+ <entry>Scope</entry>
+ <entry>Description</entry>
+ <entry>Notes</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>com_quit</literal>,
<literal>com_init_db</literal>,
+ <literal>com_query</literal>, <literal>com_field_list</literal>,
+ <literal>com_create_db</literal>, <literal>com_drop_db</literal>,
+ <literal>com_refresh</literal>, <literal>com_shutdown</literal>,
+ <literal>com_statistics</literal>,
+ <literal>com_process_info</literal>,
+ <literal>com_connect</literal>,
+ <literal>com_process_kill</literal>, <literal>com_debug</literal>,
+ <literal>com_ping</literal>, <literal>com_time</literal>,
+ <literal>com_delayed_insert</literal>,
+ <literal>com_change_user</literal>,
+ <literal>com_binlog_dump</literal>,
+ <literal>com_table_dump</literal>,
+ <literal>com_connect_out</literal>,
+ <literal>com_register_slave</literal>,
+ <literal>com_stmt_prepare</literal>,
+ <literal>com_stmt_execute</literal>,
+ <literal>com_stmt_send_long_data</literal>,
+ <literal>com_stmt_close</literal>,
+ <literal>com_stmt_reset</literal>,
+ <literal>com_stmt_set_option</literal>,
+ <literal>com_stmt_fetch</literal>,
<literal>com_daemon</literal></entry>
+ <entry>Connection</entry>
+ <entry>Total number of attempts to send a certain COM_* command from PHP to
+ MySQL.</entry>
+ <entry><para>
+ The statistics are incremented after checking the line and
+ immediately before sending the corresponding MySQL client server
+ protocol packet. If mysqlnd fails to send the packet over the
+ wire the statistics will not be decremented. In case of a failure
+ mysqlnd emits a PHP warning <quote>Error while sending %s packet.
+ PID=%d.</quote>
+ </para>
+
+ <para>
+ Usage examples:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Check if PHP sends certain commands to MySQL, for example,
+ check if a client sends <literal>COM_PROCESS_KILL</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Calculate the average number of prepared statement executions
+ by comparing <literal>COM_EXECUTE</literal> with
+ <literal>COM_PREPARE</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Check if PHP has run any non-prepared SQL statements by
+ checking if <literal>COM_QUERY</literal> is zero
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Identify PHP scripts that run an excessive number of SQL
+ statements by checking <literal>COM_QUERY</literal> and
+ <literal>COM_EXECUTE</literal>
+ </para>
+ </listitem>
+ </itemizedlist></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
<emphasis role="bold">Miscellaneous</emphasis>
</para>
<informaltable>