Mysqlnd query result cache plugin (
mysqlnd_qc
)
2696
See Also
Runtime configuration
mysqlnd_qc.collect_statistics
mysqlnd_qc.time_statistics
mysqlnd_qc_get_cache_info
20.7.7.7.5.
mysqlnd_qc_get_normalized_query_trace_log
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
mysqlnd_qc_get_normalized_query_trace_log
Returns a normalized query trace log for each query inspected by the query cache
Description
array mysqlnd_qc_get_normalized_query_trace_log();
Returns a normalized query trace log for each query inspected by the query cache. The collection
of the trace log is disabled by default. To collect the trace log you have to set the PHP configuration
directive
mysqlnd_qc.collect_normalized_query_trace
to
1
Entries in the trace log are grouped by the normalized query statement. The normalized query
statement is the query statement with all statement parameter values being replaced with a question
mark. For example, the two statements
SELECT id FROM test WHERE id = 1
and
SELECT
id FROM test WHERE id = 2
are normalized as
SELECT id FROM test WHERE id = ?
.
Whenever a statement is inspected by the query cache which matches the normalized statement
pattern, its statistics are grouped by the normalized statement string.
Parameters
This function has no parameters.
Return Values
An array of query log. Every list entry contains the normalized query stringand further detail
information.
Key
Description
query
Normalized statement string.
occurences
How many statements have matched the normalized statement string in addition to the one
which has created the log entry. The value is zero if a statement has been normalized, its
normalized representation has been added to the log but no further queries inspected by
PECL/mysqlnd_qc have the same normalized statement string.
eligible_for_caching
Whether the statement could be cached. An statement eligible for caching has not
necessarily been cached. It not possible to tell for sure if or how many cached statement
have contributed to the aggregated normalized statement log entry. However, comparing
the minimum and average run time one can make an educated guess.
avg_run_time
The average run time of all queries contributing to the query log entry. The run time is
the time between sending the query statement to MySQL and receiving an answer from
MySQL.
avg_store_time
The average store time of all queries contributing to the query log entry. The store time is
the time needed to fetch a statements result set from the server to the client and, storing it
on the client.
min_run_time
The minimum run time of all queries contributing to the query log entry.
min_store_time
The minimum store time of all queries contributing to the query log entry.
max_run_time
The maximum run time of all queries contributing to the query log entry.
max_store_time
The maximum store time of all queries contributing to the query log entry.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...