ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:suspicioussql

suspiciousSql

Syntax
mixed suspicioudSql()

Description

The function suspiciousSql() returns a list of SQL statements with high average execution times collected by the performance monitor logSql feature.

Usage

/*
* Connection to DB2 database
*/
 
$perf = newPerfMonitor($db);
 
/*
 * Enable logging
*/
$db->logSql();
 
/*
 * Execute invalid SQL statement
*/
$SQL = "SELECT * FROM act where actno > 200";
 
$db->execute($SQL);
 
 
$h = $perf->suspiciousSql()
 
print $h;

Suspicious SQL

The following SQL have high average execution times
Avg TimeCountSQLMaxMin
0.0650871SELECT * FROM act where actno > 2000.0650870.065087
0.0627971insert into adodb_logsql (created,sql0,sql1,params,tracer,timer) values( CURRENT TIMESTAMP,?,?,?,?,?)0.0627970.062797

v5/performance/suspicioussql.txt · Last modified: 2016/01/13 02:14 by mnewnham