====== suspiciousSql ======
~~NOTOC~~
== Syntax ==
string suspiciousSql()
===== Description =====
The function ''suspiciousSql()'' returns a list of SQL statements with high average execution times collected by the performance monitor logSql feature, formatted as an HTML table.
===== Usage =====
/*
* Connection to DB2 database
*/
$perf = newPerfMonitor($db);
/*
* Enable logging
*/
$db->logSql();
/*
* Execute suspicious SQL statement
*/
$SQL = "SELECT * FROM act where actno > 200";
$db->execute($SQL);
$h = $perf->suspiciousSql();
print $h;
==== Output ====
{{:v5:performance:performance-suspicious-sql.png}}