Submit a ticketCall us

AnnouncementsTHWACKcamp 2018 is here

2018 is the seventh year for THWACKcamp™, and once again we’ll be live October 17 – 18 with packed session tracks covering everything from network monitoring and management, to change control, application management, storage, cloud and DevOps, security, automation, virtualization, mapping, logging, and more.

Register for online sessions.

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: 830 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