Submit a ticketCall us

WebinarUpcoming Webinar: How Help Desk and Remote Support Pays for Itself

Learn how help desk software can simplify ticketing management, allow you to track hardware and software assets, and accelerate the speed of IT support and service delivery. Gain insights on how remote support tools allow your IT team to maximize their efficiency and ticket resolution by expediting desktop troubleshooting, ultimately helping keep end-users happy and productive.

Register here.

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