ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:suspicioussql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
v5:performance:suspicioussql [2024/03/19 22:45] – format html example output as dokuwiki syntax peterddv5:performance:suspicioussql [2024/03/21 16:14] (current) – Screenshot with sample output dregad
Line 2: Line 2:
 ~~NOTOC~~ ~~NOTOC~~
 <WRAP right box> <WRAP right box>
 +
 == Syntax == == Syntax ==
-  mixed suspiciousSql()+  string suspiciousSql()
 </WRAP> </WRAP>
 +
 ===== Description ===== ===== Description =====
-The function ''suspiciousSql()'' returns a list of SQL statements with high average execution times collected by the performance monitor logSql feature.+ 
 +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 ===== ===== Usage =====
 <code php> <code php>
Line 31: Line 35:
  
 print $h; print $h;
- 
 </code> </code>
  
-<code> +==== Output ====
-<html> +
-<h3>Suspicious SQL</h3> +
-<font size=1>The following SQL have high average execution times</font><br> +
-<table border=1 bgcolor=white><tr><td><b>Avg Time</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr> +
-<tr><td>0.065087<td align=right>1<td><font size=-1><a target=sql205519396 href="?hidem=1&exps=1&sql=SELECT+%2A+FROM+act+where+actno+%3E+%27A%27&x#explain">SELECT * FROM act where actno &gt; 200</a></font><td>0.065087<td>0.065087</tr><tr><td>0.062797<td align=right>1<td><font size=-1><a target=sql1678387404 href="?hidem=1&exps=1&sql=insert+into+adodb_logsql+%28created%2Csql0%2Csql1%2Cparams%2Ctracer%2Ctimer%29+values%28+CURRENT+TIMESTAMP%2C%3F%2C%3F%2C%3F%2C%3F%2C%3F%29&x#explain">insert into adodb_logsql (created,sql0,sql1,params,tracer,timer) values( CURRENT TIMESTAMP,?,?,?,?,?)</a></font><td>0.062797<td>0.062797</tr></table> +
-</html> +
-</code> +
- +
- +
-====Suspicious SQL==== +
- +
-The following SQL have high average execution times +
- +
-^Avg Time^Count^SQL                                ^Max     ^Min^ +
-|0.065087|1    |SELECT * FROM act where actno > 200|0.065087|0.065087| +
-|0.062797|1    |insert into adodb_logsql (created,sql0,sql1,params,tracer,timer) values( CURRENT TIMESTAMP,?,?,?,?,?)|0.062797|0.062797| +
  
 +{{:v5:performance:performance-suspicious-sql.png}}
v5/performance/suspicioussql.txt · Last modified: 2024/03/21 16:14 by dregad