![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461962551.webp)
MySQL Native Driver (
Mysqlnd
)
2531
Generation of
COM_CHANGE_USER
can be switched off with the compile flag
MYSQLI_NO_CHANGE_USER_ON_PCONNECT
. For example:
shell# CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT" ./configure --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --enable-debug && make clean && make -j6
Or alternatively:
shell# export CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT"
shell# configure --whatever-option
shell# make clean
shell# make
Note that only
mysqli
on
mysqlnd
uses
COM_CHANGE_USER
. Other extension-driver combinations
use
COM_PING
on initial use of a persistent connection.
20.7.5.5. Statistics
Copyright 1997-2012 the PHP Documentation Group. [2230]
Using Statistical Data
MySQL Native Driver contains support for gathering statistics on the communication between the client
and the server. The statistics gathered are of three main types:
• Client statistics
• Connection statistics
• Zval cache statistics
If you are using the
mysqli
extension, these statistics can be obtained through three API calls:
•
mysqli_get_client_stats
•
mysqli_get_connection_stats
•
mysqli_get_cache_stats
Note
Statistics are aggregated among all extensions that use MySQL Native Driver.
For example, when compiling both
ext/mysql
and
ext/mysqli
against
MySQL Native Driver, both function calls of
ext/mysql
and
ext/mysqli
will
change the statistics. There is no way to find out how much a certain API call
of any extension that has been compiled against MySQL Native Driver has
impacted a certain statistic. You can configure the PDO MySQL Driver,
ext/
mysql
and
ext/mysqli
to optionally use the MySQL Native Driver. When
doing so, all three extensions will change the statistics.
Accessing Client Statistics
To access client statistics, you need to call
mysqli_get_client_stats
. The function call does not
require any parameters.
The function returns an associative array that contains the name of the statistic as the key and the
statistical data as the value.
Client statistics can also be accessed by calling the
phpinfo
function.
Accessing Connection Statistics
To access connection statistics call
mysqli_get_connection_stats
. This takes the database
connection handle as the parameter.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...