Added a table showing a list of statistics

returned by mysqli/mysqlnd statistics functions.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@275668 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Anthony Bedford 2009-02-12 15:37:48 +00:00
parent 91bf2ddf0c
commit 81383a4d24

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<chapter xml:id="mysqli.mysqlnd" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>The MySQL Native Driver</title>
@ -253,8 +253,8 @@ $conn = new mysqli($host, $user, $password, $dbname, $port, $socket)
</itemizedlist>
<para>
If you are using the <literal>mysqli</literal> extension,
these statistics can be obtained through three API calls:
If you are using the <literal>mysqli</literal> extension, these
statistics can be obtained through three API calls:
</para>
<itemizedlist>
@ -299,8 +299,6 @@ $conn = new mysqli($host, $user, $password, $dbname, $port, $socket)
<function>phpinfo</function> function.
</para>
<!-- [Table of client statistics] -->
<para>
<emphasis role="bold">Accessing Connection Statistics</emphasis>
</para>
@ -316,8 +314,6 @@ $conn = new mysqli($host, $user, $password, $dbname, $port, $socket)
the statistic as the key and the statistical data as the value.
</para>
<!-- [Table of connection statistics] -->
<para>
<emphasis role="bold">Accessing Zval Cache Statistics</emphasis>
</para>
@ -325,7 +321,7 @@ $conn = new mysqli($host, $user, $password, $dbname, $port, $socket)
<para>
The MySQL Native Driver also collects statistics from its internal
Zval cache. These statistics can be accessed by calling
<function>mysqli_get_cache_stat</function>.
<function>mysqli_get_cache_stats</function>.
</para>
<para>
@ -334,6 +330,386 @@ $conn = new mysqli($host, $user, $password, $dbname, $port, $socket)
resulting in better performance.
</para>
<para>
<emphasis role="bold">Statistics returned by MySQL Native
Driver</emphasis>
</para>
<para>
The following table shows a list of statistics returned by the
<function>mysqli_get_client_stats</function>,
<function>mysqli_get_connections_stats</function> and
<function>mysqli_get_cache_stats</function> functions.
</para>
<informaltable>
<tgroup cols="1">
<colspec colwidth="30*"/>
<tbody>
<row>
<entry><emphasis role="bold">Statistic</emphasis></entry>
</row>
<row>
<entry>bytes_sent</entry>
</row>
<row>
<entry>bytes_received</entry>
</row>
<row>
<entry>packets_sent</entry>
</row>
<row>
<entry>packets_received</entry>
</row>
<row>
<entry>protocol_overhead_in</entry>
</row>
<row>
<entry>protocol_overhead_out</entry>
</row>
<row>
<entry>bytes_received_ok_packet</entry>
</row>
<row>
<entry>bytes_received_eof_packet</entry>
</row>
<row>
<entry>bytes_received_rset_header_packet</entry>
</row>
<row>
<entry>bytes_received_rset_field_meta_packet</entry>
</row>
<row>
<entry>bytes_received_rset_row_packet</entry>
</row>
<row>
<entry>bytes_received_prepare_response_packet</entry>
</row>
<row>
<entry>bytes_received_change_user_packet</entry>
</row>
<row>
<entry>packets_sent_command</entry>
</row>
<row>
<entry>packets_received_ok</entry>
</row>
<row>
<entry>packets_received_eof</entry>
</row>
<row>
<entry>packets_received_rset_header</entry>
</row>
<row>
<entry>packets_received_rset_field_meta</entry>
</row>
<row>
<entry>packets_received_rset_row</entry>
</row>
<row>
<entry>packets_received_prepare_response</entry>
</row>
<row>
<entry>packets_received_change_user</entry>
</row>
<row>
<entry>result_set_queries</entry>
</row>
<row>
<entry>non_result_set_queries</entry>
</row>
<row>
<entry>no_index_used</entry>
</row>
<row>
<entry>bad_index_used</entry>
</row>
<row>
<entry>slow_queries</entry>
</row>
<row>
<entry>buffered_sets</entry>
</row>
<row>
<entry>unbuffered_sets</entry>
</row>
<row>
<entry>ps_buffered_sets</entry>
</row>
<row>
<entry>ps_unbuffered_sets</entry>
</row>
<row>
<entry>flushed_normal_sets</entry>
</row>
<row>
<entry>flushed_ps_sets</entry>
</row>
<row>
<entry>ps_prepared_never_executed</entry>
</row>
<row>
<entry>ps_prepared_once_executed</entry>
</row>
<row>
<entry>rows_fetched_from_server_normal</entry>
</row>
<row>
<entry>rows_fetched_from_server_ps</entry>
</row>
<row>
<entry>rows_buffered_from_client_normal</entry>
</row>
<row>
<entry>rows_buffered_from_client_ps</entry>
</row>
<row>
<entry>rows_fetched_from_client_normal_buffered</entry>
</row>
<row>
<entry>rows_fetched_from_client_normal_unbuffered</entry>
</row>
<row>
<entry>rows_fetched_from_client_ps_buffered</entry>
</row>
<row>
<entry>rows_fetched_from_client_ps_unbuffered</entry>
</row>
<row>
<entry>rows_fetched_from_client_ps_cursor</entry>
</row>
<row>
<entry>rows_skipped_normal</entry>
</row>
<row>
<entry>rows_skipped_ps</entry>
</row>
<row>
<entry>copy_on_write_saved</entry>
</row>
<row>
<entry>copy_on_write_performed</entry>
</row>
<row>
<entry>command_buffer_too_small</entry>
</row>
<row>
<entry>connect_success</entry>
</row>
<row>
<entry>connect_failure</entry>
</row>
<row>
<entry>connection_reused</entry>
</row>
<row>
<entry>reconnect</entry>
</row>
<row>
<entry>pconnect_success</entry>
</row>
<row>
<entry>active_connections</entry>
</row>
<row>
<entry>active_persistent_connections</entry>
</row>
<row>
<entry>explicit_close</entry>
</row>
<row>
<entry>implicit_close</entry>
</row>
<row>
<entry>disconnect_close</entry>
</row>
<row>
<entry>in_middle_of_command_close</entry>
</row>
<row>
<entry>explicit_free_result</entry>
</row>
<row>
<entry>implicit_free_result</entry>
</row>
<row>
<entry>explicit_stmt_close</entry>
</row>
<row>
<entry>implicit_stmt_close</entry>
</row>
<row>
<entry>mem_emalloc_count</entry>
</row>
<row>
<entry>mem_emalloc_ammount</entry>
</row>
<row>
<entry>mem_ecalloc_count</entry>
</row>
<row>
<entry>mem_ecalloc_ammount</entry>
</row>
<row>
<entry>mem_erealloc_count</entry>
</row>
<row>
<entry>mem_erealloc_ammount</entry>
</row>
<row>
<entry>mem_efree_count</entry>
</row>
<row>
<entry>mem_malloc_count</entry>
</row>
<row>
<entry>mem_malloc_ammount</entry>
</row>
<row>
<entry>mem_calloc_count</entry>
</row>
<row>
<entry>mem_calloc_ammount</entry>
</row>
<row>
<entry>mem_realloc_count</entry>
</row>
<row>
<entry>mem_realloc_ammount</entry>
</row>
<row>
<entry>mem_free_count</entry>
</row>
<row>
<entry>proto_text_fetched_null</entry>
</row>
<row>
<entry>proto_text_fetched_bit</entry>
</row>
<row>
<entry>proto_text_fetched_tinyint</entry>
</row>
<row>
<entry>proto_text_fetched_short</entry>
</row>
<row>
<entry>proto_text_fetched_int24</entry>
</row>
<row>
<entry>proto_text_fetched_int</entry>
</row>
<row>
<entry>proto_text_fetched_bigint</entry>
</row>
<row>
<entry>proto_text_fetched_decimal</entry>
</row>
<row>
<entry>proto_text_fetched_float</entry>
</row>
<row>
<entry>proto_text_fetched_double</entry>
</row>
<row>
<entry>proto_text_fetched_date</entry>
</row>
<row>
<entry>proto_text_fetched_year</entry>
</row>
<row>
<entry>proto_text_fetched_time</entry>
</row>
<row>
<entry>proto_text_fetched_datetime</entry>
</row>
<row>
<entry>proto_text_fetched_timestamp</entry>
</row>
<row>
<entry>proto_text_fetched_string</entry>
</row>
<row>
<entry>proto_text_fetched_blob</entry>
</row>
<row>
<entry>proto_text_fetched_enum</entry>
</row>
<row>
<entry>proto_text_fetched_set</entry>
</row>
<row>
<entry>proto_text_fetched_geometry</entry>
</row>
<row>
<entry>proto_text_fetched_other</entry>
</row>
<row>
<entry>proto_binary_fetched_null</entry>
</row>
<row>
<entry>proto_binary_fetched_bit</entry>
</row>
<row>
<entry>proto_binary_fetched_tinyint</entry>
</row>
<row>
<entry>proto_binary_fetched_short</entry>
</row>
<row>
<entry>proto_binary_fetched_int24</entry>
</row>
<row>
<entry>proto_binary_fetched_int</entry>
</row>
<row>
<entry>proto_binary_fetched_bigint</entry>
</row>
<row>
<entry>proto_binary_fetched_decimal</entry>
</row>
<row>
<entry>proto_binary_fetched_float</entry>
</row>
<row>
<entry>proto_binary_fetched_double</entry>
</row>
<row>
<entry>proto_binary_fetched_date</entry>
</row>
<row>
<entry>proto_binary_fetched_year</entry>
</row>
<row>
<entry>proto_binary_fetched_time</entry>
</row>
<row>
<entry>proto_binary_fetched_datetime</entry>
</row>
<row>
<entry>proto_binary_fetched_timestamp</entry>
</row>
<row>
<entry>proto_binary_fetched_string</entry>
</row>
<row>
<entry>proto_binary_fetched_blob</entry>
</row>
<row>
<entry>proto_binary_fetched_enum</entry>
</row>
<row>
<entry>proto_binary_fetched_set</entry>
</row>
<row>
<entry>proto_binary_fetched_geometry</entry>
</row>
<row>
<entry>proto_binary_fetched_other</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</chapter>
<!-- Keep this comment at the end of the file
Local variables: