Oracle 5.0 Reference Manual page 2719

Table of Contents

Advertisement

mysqlnd_qc.time_statistics
mysqlnd_qc_get_query_trace_log
20.7.7.7.6.
mysqlnd_qc_get_query_trace_log
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysqlnd_qc_get_query_trace_log
Returns a backtrace for each query inspected by the query cache
Description
array mysqlnd_qc_get_query_trace_log();
Returns a backtrace for each query inspected by the query cache. The collection of the backtrace
is disabled by default. To collect the backtrace you have to set the PHP configuration directive
mysqlnd_qc.collect_query_trace
The maximum depth of the backtrace is limited to the depth set with the PHP configuration directive
mysqlnd_qc.query_trace_bt_depth.
Parameters
This function has no parameters.
Return Values
An array of query backtrace. Every list entry contains the query string, a backtrace and further detail
information.
Key
Description
Query string.
query
Code backtrace.
origin
Query run time in milliseconds. The collection of all times and the necessary
run_time
gettimeofday
mysqlnd_qc.time_statistics
Query result set store time in milliseconds. The collection of all times and the necessary
store_time
gettimeofday
mysqlnd_qc.time_statistics
eligible_for_caching
TRUE
no_table TRUE
set has no table name set in its metadata. This is usually the case with queries
which one probably do not want to cache such as
any such query will not be added to the cache. See also PHP configuration directive
mysqlnd_qc.cache_no_table.
was_added TRUE
was_already_in_cache
TRUE
cache (cache hit). Otherwise
Examples
Example 20.325.
mysqlnd_qc.collect_query_trace=1
<?php
/* Connect, create and populate test table */
Mysqlnd query result cache plugin (mysqlnd_qc)
system calls can be disabled by setting the PHP configuration directive
system calls can be disabled by setting the PHP configuration directive
if query is cacheable otherwise
if the query has generated a result set and at least one column from the result
if the query result has been put into the cache, otherwise
if the query result would have been added to the cache if it was not already in the
mysqlnd_qc_get_query_trace_log
to
1
to
0
to
0
.
FALSE
SELECT
.
FALSE
example
2699
SLEEP(1). By default
.
FALSE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents