Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

Home > Success Center > Database Performance Analyzer (DPA) > DPA - Knowledgebase Articles > SQL batches in MySQL affect statistics

SQL batches in MySQL affect statistics

Table of contents
Created by Anthony.Rinaldi_ret, last modified by MindTouch on Jun 23, 2016

Views: 836 Votes: 0 Revisions: 2

Overview

MySQL only publishes the information necessary to retrieve statistics for the last query in a batch of SQL statements. This affects DPA's ability to accurately report statistics for some of the SQL in the batch.

Environment

  • All versions of DPA

Detail

As an example, take this batch of SQL statements:

SELECT count(1) FROM t1;SELECT count(1) FROM t2;SELECT count(1) FROM t3;

DPA appropriately reports wait time separately for each of the SQLs in this batch. However,statistics are only available for the last query in the batch:

SELECT count(1) FROM t3;

DPA can report partial statistics for SQL statements that are sometimes executed individually and sometimes in a batch. DPA collects statistics for the SQL statements executed individually, and those are the statistics that get reported.

If DPA is reporting the wait time only for sets of batched SQL statements, the MYSQL_JOIN_PROCESSLIST advanced option might be set to FALSE. If DPA is running in this mode, you won't see statistics for any of the individually executed batch SQL statements either.

 

 

Last modified

Tags

Classifications

Public