Oracle 5.0 Reference Manual page 2716

Table of Contents

Advertisement

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
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
id FROM test WHERE id = 2
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
Normalized statement string.
query
How many statements have matched the normalized statement string in addition to the one
occurences
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.
Whether the statement could be cached. An statement eligible for caching has not
eligible_for_caching
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.
The average run time of all queries contributing to the query log entry. The run time is
avg_run_time
the time between sending the query statement to MySQL and receiving an answer from
MySQL.
The average store time of all queries contributing to the query log entry. The store time is
avg_store_time
the time needed to fetch a statements result set from the server to the client and, storing it
on the client.
The minimum run time of all queries contributing to the query log entry.
min_run_time
The minimum store time of all queries contributing to the query log entry.
min_store_time
The maximum run time of all queries contributing to the query log entry.
max_run_time
The maximum store time of all queries contributing to the query log entry.
max_store_time
Mysqlnd query result cache plugin (mysqlnd_qc)
SELECT id FROM test WHERE id = 1
are normalized as
to
SELECT id FROM test WHERE id =
2696
1
and
SELECT
?.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents