ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:expensivesql

expensiveSql

Syntax
mixed expensiveSql()

Description

The function expensiveSql() returns a list of SQL statements with very high 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->expensiveSql()
 
print $h;

Expensive SQL

Tuning the following SQL could reduce the server load substantially
LoadCountSQLMaxMin

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