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

Next revision
Previous revision
Last revisionBoth sides next revision
performance:suspicioussql [2015/08/23 16:45] – created mnewnhamv5:performance:suspicioussql [2024/03/19 22:45] – format html example output as dokuwiki syntax peterdd
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == Syntax == == Syntax ==
-  mixed suspicioudSql()+  mixed suspiciousSql()
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
Line 21: Line 21:
  
 /* /*
- * Execute invalid SQL statement+ * Execute suspicious SQL statement
 */ */
 $SQL = "SELECT * FROM act where actno > 200"; $SQL = "SELECT * FROM act where actno > 200";
Line 28: Line 28:
  
  
-$h = $perf->suspiciousSql()+$h = $perf->suspiciousSql();
  
 print $h; print $h;
Line 34: Line 34:
 </code> </code>
  
 +<code>
 <html> <html>
 <h3>Suspicious SQL</h3> <h3>Suspicious SQL</h3>
Line 40: Line 41:
 <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> <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> </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/suspicioussql.txt · Last modified: 2024/03/21 16:14 by dregad