<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="sys-statement-performance-analyzer">
      </a>
      30.4.4.25 The statement_performance_analyzer() Procedure
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045061216480">
  </a>
  <a class="indexterm" name="idm46045061214960">
  </a>
  <p>
   Creates a report of the statements running on the server. The
          views are calculated based on the overall and/or delta
          activity.
  </p>
  <p>
   This procedure disables binary logging during its execution by
          manipulating the session value of the
   <a class="link" href="replication-options-binary-log.html#sysvar_sql_log_bin">
    <code class="literal">
     sql_log_bin
    </code>
   </a>
   system variable.
          That is a restricted operation, so the procedure requires
          privileges sufficient to set restricted session variables. See
   <a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
    Section 7.1.9.1, “System Variable Privileges”
   </a>
   .
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="sys-statement-performance-analyzer-parameters">
       </a>
       Parameters
      </h5>
     </div>
    </div>
   </div>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        in_action ENUM('snapshot', 'overall', 'delta',
                'create_tmp', 'create_table', 'save',
                'cleanup')
       </code>
       : The action to take. These values
                are permitted:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <code class="literal">
           snapshot
          </code>
          : Store a snapshot. The
                    default is to make a snapshot of the current content
                    of the Performance Schema
          <a class="link" href="performance-schema-statement-summary-tables.html" title="29.12.20.3 Statement Summary Tables">
           <code class="literal">
            events_statements_summary_by_digest
           </code>
          </a>
          table. By setting
          <code class="literal">
           in_table
          </code>
          , this
                    can be overwritten to copy the content of the
                    specified table. The snapshot is stored in the
          <a class="link" href="sys-schema.html" title="Chapter 30 MySQL sys Schema">
           <code class="literal">
            sys
           </code>
          </a>
          schema
          <code class="literal">
           tmp_digests
          </code>
          temporary table.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           overall
          </code>
          : Generate an analysis
                    based on the content of the table specified by
          <code class="literal">
           in_table
          </code>
          . For the overall
                    analysis,
          <code class="literal">
           in_table
          </code>
          can be
          <a class="link" href="date-and-time-functions.html#function_now">
           <code class="literal">
            NOW()
           </code>
          </a>
          to use a fresh
                    snapshot. This overwrites an existing snapshot. Use
          <code class="literal">
           NULL
          </code>
          for
          <code class="literal">
           in_table
          </code>
          to use the existing
                    snapshot. If
          <code class="literal">
           in_table
          </code>
          is
          <code class="literal">
           NULL
          </code>
          and no snapshot exists, a
                    new snapshot is created. The
          <code class="literal">
           in_views
          </code>
          parameter and the
          <code class="literal">
           statement_performance_analyzer.limit
          </code>
          configuration option affect the operation of this
                    procedure.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           delta
          </code>
          : Generate a delta analysis.
                    The delta is calculated between the reference table
                    specified by
          <code class="literal">
           in_table
          </code>
          and the
                    snapshot, which must exist. This action uses the
          <a class="link" href="sys-schema.html" title="Chapter 30 MySQL sys Schema">
           <code class="literal">
            sys
           </code>
          </a>
          schema
          <code class="literal">
           tmp_digests_delta
          </code>
          temporary
                    table. The
          <code class="literal">
           in_views
          </code>
          parameter and
                    the
          <code class="literal">
           statement_performance_analyzer.limit
          </code>
          configuration option affect the operation of this
                    procedure.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           create_table
          </code>
          : Create a regular
                    table suitable for storing the snapshot for later
                    use (for example, for calculating deltas).
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           create_tmp
          </code>
          : Create a temporary
                    table suitable for storing the snapshot for later
                    use (for example, for calculating deltas).
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           save
          </code>
          : Save the snapshot in the
                    table specified by
          <code class="literal">
           in_table
          </code>
          . The
                    table must exist and have the correct structure. If
                    no snapshot exists, a new snapshot is created.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           cleanup
          </code>
          : Remove the temporary
                    tables used for the snapshot and delta.
         </p>
        </li>
       </ul>
      </div>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        in_table VARCHAR(129)
       </code>
       : The table
                parameter used for some of the actions specified by the
       <code class="literal">
        in_action
       </code>
       parameter. Use the format
       <em class="replaceable">
        <code>
         db_name.tbl_name
        </code>
       </em>
       or
       <em class="replaceable">
        <code>
         tbl_name
        </code>
       </em>
       without using any
                backtick (
       <code class="literal">
        `
       </code>
       ) identifier-quoting
                characters. Periods (
       <code class="literal">
        .
       </code>
       ) are not
                supported in database and table names.
      </p>
      <p>
       The meaning of the
       <code class="literal">
        in_table
       </code>
       value for
                each
       <code class="literal">
        in_action
       </code>
       value is detailed in
                the individual
       <code class="literal">
        in_action
       </code>
       value
                descriptions.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        in_views SET
                ('with_runtimes_in_95th_percentile', 'analysis',
                'with_errors_or_warnings', 'with_full_table_scans',
                'with_sorting', 'with_temp_tables', 'custom')
       </code>
       :
                Which views to include. This parameter is a
       <code class="literal">
        SET
       </code>
       value, so it can contain multiple
                view names, separated by commas. The default is to
                include all views except
       <code class="literal">
        custom
       </code>
       . The
                following values are permitted:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <code class="literal">
           with_runtimes_in_95th_percentile
          </code>
          :
                    Use the
          <a class="link" href="sys-statements-with-runtimes-in-95th-percentile.html" title="30.4.3.38 The statements_with_runtimes_in_95th_percentile and x$statements_with_runtimes_in_95th_percentile Views">
           <code class="literal">
            statements_with_runtimes_in_95th_percentile
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           analysis
          </code>
          : Use the
          <a class="link" href="sys-statement-analysis.html" title="30.4.3.35 The statement_analysis and x$statement_analysis Views">
           <code class="literal">
            statement_analysis
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           with_errors_or_warnings
          </code>
          : Use the
          <a class="link" href="sys-statements-with-errors-or-warnings.html" title="30.4.3.36 The statements_with_errors_or_warnings and x$statements_with_errors_or_warnings Views">
           <code class="literal">
            statements_with_errors_or_warnings
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           with_full_table_scans
          </code>
          : Use the
          <a class="link" href="sys-statements-with-full-table-scans.html" title="30.4.3.37 The statements_with_full_table_scans and x$statements_with_full_table_scans Views">
           <code class="literal">
            statements_with_full_table_scans
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           with_sorting
          </code>
          : Use the
          <a class="link" href="sys-statements-with-sorting.html" title="30.4.3.39 The statements_with_sorting and x$statements_with_sorting Views">
           <code class="literal">
            statements_with_sorting
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           with_temp_tables
          </code>
          : Use the
          <a class="link" href="sys-statements-with-temp-tables.html" title="30.4.3.40 The statements_with_temp_tables and x$statements_with_temp_tables Views">
           <code class="literal">
            statements_with_temp_tables
           </code>
          </a>
          view.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           custom
          </code>
          : Use a custom view. This
                    view must be specified using the
          <code class="literal">
           statement_performance_analyzer.view
          </code>
          configuration option to name a query or an existing
                    view.
         </p>
        </li>
       </ul>
      </div>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="sys-statement-performance-analyzer-configuration-options">
       </a>
       Configuration Options
      </h5>
     </div>
    </div>
   </div>
   <p>
    <a class="link" href="sys-statement-performance-analyzer.html" title="30.4.4.25 The statement_performance_analyzer() Procedure">
     <code class="literal">
      statement_performance_analyzer()
     </code>
    </a>
    operation can be modified using the following configuration
            options or their corresponding user-defined variables (see
    <a class="xref" href="sys-sys-config.html" title="30.4.2.1 The sys_config Table">
     Section 30.4.2.1, “The sys_config Table”
    </a>
    ):
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <code class="literal">
        debug
       </code>
       ,
       <code class="literal">
        @sys.debug
       </code>
      </p>
      <p>
       If this option is
       <code class="literal">
        ON
       </code>
       , produce
                debugging output. The default is
       <code class="literal">
        OFF
       </code>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        statement_performance_analyzer.limit
       </code>
       ,
       <code class="literal">
        @sys.statement_performance_analyzer.limit
       </code>
      </p>
      <p>
       The maximum number of rows to return for views that have
                no built-in limit. The default is 100.
      </p>
     </li>
     <li class="listitem">
      <p>
       <code class="literal">
        statement_performance_analyzer.view
       </code>
       ,
       <code class="literal">
        @sys.statement_performance_analyzer.view
       </code>
      </p>
      <p>
       The custom query or view to be used. If the option value
                contains a space, it is interpreted as a query.
                Otherwise, it must be the name of an existing view that
                queries the Performance Schema
       <a class="link" href="performance-schema-statement-summary-tables.html" title="29.12.20.3 Statement Summary Tables">
        <code class="literal">
         events_statements_summary_by_digest
        </code>
       </a>
       table. There cannot be any
       <code class="literal">
        LIMIT
       </code>
       clause in the query or view definition if the
       <code class="literal">
        statement_performance_analyzer.limit
       </code>
       configuration option is greater than 0. If specifying a
                view, use the same format as for the
       <code class="literal">
        in_table
       </code>
       parameter. The default is
       <code class="literal">
        NULL
       </code>
       (no custom view defined).
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="sys-statement-performance-analyzer-example">
       </a>
       Example
      </h5>
     </div>
    </div>
   </div>
   <p>
    To create a report with the queries in the 95th percentile
            since the last truncation of
    <a class="link" href="performance-schema-statement-summary-tables.html" title="29.12.20.3 Statement Summary Tables">
     <code class="literal">
      events_statements_summary_by_digest
     </code>
    </a>
    and with a one-minute delta period:
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Create a temporary table to store the initial snapshot.
      </p>
     </li>
     <li class="listitem">
      <p>
       Create the initial snapshot.
      </p>
     </li>
     <li class="listitem">
      <p>
       Save the initial snapshot in the temporary table.
      </p>
     </li>
     <li class="listitem">
      <p>
       Wait one minute.
      </p>
     </li>
     <li class="listitem">
      <p>
       Create a new snapshot.
      </p>
     </li>
     <li class="listitem">
      <p>
       Perform analysis based on the new snapshot.
      </p>
     </li>
     <li class="listitem">
      <p>
       Perform analysis based on the delta between the initial
                and new snapshots.
      </p>
     </li>
    </ol>
   </div>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa93939511"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'create_tmp'</span><span class="token punctuation">,</span> <span class="token string">'mydb.tmp_digests_ini'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.08 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'snapshot'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.02 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'save'</span><span class="token punctuation">,</span> <span class="token string">'mydb.tmp_digests_ini'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">DO</span> <span class="token function">SLEEP</span><span class="token punctuation">(</span><span class="token number">60</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (1 min 0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'snapshot'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.02 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'overall'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span> <span class="token string">'with_runtimes_in_95th_percentile'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Next Output                             <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Queries with Runtime in 95th Percentile <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.05 sec)</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'delta'</span><span class="token punctuation">,</span> <span class="token string">'mydb.tmp_digests_ini'</span><span class="token punctuation">,</span> <span class="token string">'with_runtimes_in_95th_percentile'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Next Output                             <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Queries with Runtime in 95th Percentile <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.03 sec)</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
   </div>
   <p>
    Create an overall report of the 95th percentile queries and
            the top 10 queries with full table scans:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa54901623"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'snapshot'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.01 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SET</span> <span class="token variable">@sys.statement_performance_analyzer.limit</span> <span class="token operator">=</span> <span class="token number">10</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'overall'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span> <span class="token string">'with_runtimes_in_95th_percentile,with_full_table_scans'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Next Output                             <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Queries with Runtime in 95th Percentile <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.01 sec)</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>

<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Next Output                         <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Top 10 Queries with Full Table Scan <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.09 sec)</span>

<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
   </div>
   <p>
    Use a custom view showing the top 10 queries sorted by total
            execution time, refreshing the view every minute using the
    <span class="command">
     <strong>
      watch
     </strong>
    </span>
    command in Linux:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa78470561"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token operator">OR</span> <span class="token keyword">REPLACE</span> <span class="token keyword">VIEW</span> mydb<span class="token punctuation">.</span>my_statements <span class="token keyword">AS</span>
       <span class="token keyword">SELECT</span> sys<span class="token punctuation">.</span>format_statement<span class="token punctuation">(</span>DIGEST_TEXT<span class="token punctuation">)</span> <span class="token keyword">AS</span> <span class="token keyword">query</span><span class="token punctuation">,</span>
              <span class="token keyword">SCHEMA_NAME</span> <span class="token keyword">AS</span> db<span class="token punctuation">,</span>
              COUNT_STAR <span class="token keyword">AS</span> exec_count<span class="token punctuation">,</span>
              sys<span class="token punctuation">.</span>format_time<span class="token punctuation">(</span>SUM_TIMER_WAIT<span class="token punctuation">)</span> <span class="token keyword">AS</span> total_latency<span class="token punctuation">,</span>
              sys<span class="token punctuation">.</span>format_time<span class="token punctuation">(</span>AVG_TIMER_WAIT<span class="token punctuation">)</span> <span class="token keyword">AS</span> avg_latency<span class="token punctuation">,</span>
              <span class="token function">ROUND</span><span class="token punctuation">(</span><span class="token function">IFNULL</span><span class="token punctuation">(</span>SUM_ROWS_SENT <span class="token operator">/</span> <span class="token function">NULLIF</span><span class="token punctuation">(</span>COUNT_STAR<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">AS</span> rows_sent_avg<span class="token punctuation">,</span>
              <span class="token function">ROUND</span><span class="token punctuation">(</span><span class="token function">IFNULL</span><span class="token punctuation">(</span>SUM_ROWS_EXAMINED <span class="token operator">/</span> <span class="token function">NULLIF</span><span class="token punctuation">(</span>COUNT_STAR<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">AS</span> rows_examined_avg<span class="token punctuation">,</span>
              <span class="token function">ROUND</span><span class="token punctuation">(</span><span class="token function">IFNULL</span><span class="token punctuation">(</span>SUM_ROWS_AFFECTED <span class="token operator">/</span> <span class="token function">NULLIF</span><span class="token punctuation">(</span>COUNT_STAR<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">AS</span> rows_affected_avg<span class="token punctuation">,</span>
              DIGEST <span class="token keyword">AS</span> digest
         <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>events_statements_summary_by_digest
       <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> SUM_TIMER_WAIT <span class="token keyword">DESC</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.10 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>statement_performance_analyzer<span class="token punctuation">(</span><span class="token string">'create_table'</span><span class="token punctuation">,</span> <span class="token string">'mydb.digests_prev'</span><span class="token punctuation">,</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.10 sec)</span>

$<span class="token operator">&gt;</span> watch <span class="token operator">-</span>n <span class="token number">60</span> <span class="token string">"mysql sys --table -e \"
&gt; SET @sys.statement_performance_analyzer.view = 'mydb.my_statements';
&gt; SET @sys.statement_performance_analyzer.limit = 10;
&gt; CALL statement_performance_analyzer('snapshot', NULL, NULL);
&gt; CALL statement_performance_analyzer('delta', 'mydb.digests_prev', 'custom');
&gt; CALL statement_performance_analyzer('save', 'mydb.digests_prev', NULL);
&gt; \""</span>

<span class="token keyword">Every</span> <span class="token number">60</span><span class="token punctuation">.</span>0s: mysql sys <span class="token comment" spellcheck="true">--table -e "        ...  Mon Dec 22 10:58:51 2014</span>

<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Next Output                      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Top 10 Queries Using Custom View <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> query             <span class="token punctuation">|</span> db    <span class="token punctuation">|</span> exec_count <span class="token punctuation">|</span> total_latency <span class="token punctuation">|</span> avg_latency <span class="token punctuation">|</span> rows_sent_avg <span class="token punctuation">|</span> rows_examined_avg <span class="token punctuation">|</span> rows_affected_avg <span class="token punctuation">|</span> digest                           <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
   </div>
  </div>
 </div>
 <br/>
</div>
