ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:performance:expensivesql

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:performance:expensivesql [2016/01/13 02:14] – ↷ Page moved from performance:expensivesql to v5:performance:expensivesql mnewnhamv5:performance:expensivesql [2024/03/21 16:12] (current) – Screenshot with sample output dregad
Line 1: Line 1:
-====== expensiveSql ====== 
 ~~NOTOC~~ ~~NOTOC~~
 <WRAP right box> <WRAP right box>
 +
 == Syntax == == Syntax ==
-  mixed expensiveSql()+  string expensiveSql()
 </WRAP> </WRAP>
 +
 ===== Description ===== ===== Description =====
-The function ''expensiveSql()'' returns a list of SQL statements with very high execution times collected by the performance monitor logSql feature.+ 
 +The function ''expensiveSql()'' returns a list of SQL statements with very high execution times collected by the performance monitor logSql feature, formatted as an HTML table. 
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
Line 21: Line 24:
  
 /* /*
- * Execute invalid SQL statement+ * Execute expensive SQL statement
 */ */
 $SQL = "SELECT * FROM act where actno > 200"; $SQL = "SELECT * FROM act where actno > 200";
Line 28: Line 31:
  
  
-$h = $perf->expensiveSql()+$h = $perf->expensiveSql();
  
 print $h; print $h;
- 
 </code> </code>
  
-<html> +==== Output ==== 
-<h3>Expensive SQL</h3> + 
-<font size=1>Tuning the following SQL could reduce the server load substantially</font><br> +{{:v5:performance:performance-expensive-sql.png}} 
-<table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr> +
-</table> +
-</html>+
  
v5/performance/expensivesql.1452647653.txt.gz · Last modified: 2017/04/21 11:30 (external edit)