mixed expensiveSql()
The function expensiveSql()
returns a list of SQL statements with very high execution times collected by the performance monitor logSql feature.
/* * 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;
Load | Count | SQL | Max | Min |