MySql Query Test

This test reports the performance statistics pertaining to the queries executed on the MySQL server.

Target of the test : A MySQL server

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the database being monitored

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed

Host

Specify Host name of the server for which the test is to be configured in this text box.

Port

Specify the port to which the specified host listens in this text box.

Database(DB)

Specify the name of a database on the target MySQL database server being monitored in the Database text box.

Username and Password

The eG agent has to be configured with the credentials of a user who has server-wide Process and Select privileges on the monitored MySQL server. To know how to create such a user, refer to Pre-requisites for Monitoring the MySQL Server topic.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Allow Public Key

By default, the Allow Public Key flag is set to No. But, if the specified USER is created with caching_sha2_password as the authentication plugin, then the eG agent can connect to the target database cluster using RSA public key. To this effect, you have to set Allow Public Key flag to Yes.

SSL

By default, the SSL flag is set to No, indicating that the target MySQL database server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled MySQL database server , set the SSL flag to Yes.

Verify CA

If the eG agent is required to establish an encrypted connection with the target MySQL database server by authenticating the server's identity through verifying the server CA certificate, set Verify CA flag to Yes. By default, this flag is set to No.

Truststore Password

This parameter is applicable only if the Verify CA parameter is set to Yes. To verify the target server certificate, provide the password of the truststore file which contains the server CA certificate in the Truststore Password text box. By default, this parameter is set to none.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Keystore Password

This parameter is applicable only if the Verify CA parameter is set to Yes. To establish a connection with the target MySQL database server , the eG agent needs to have access to the client certificate. For this provide the password of the keystore file which contains the client certificate in the Keystore Password text box. By default, this parameter is set to none.

Confirm Password

Confirm the Password by retyping it in the Confirm Password text box.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Query rate:

Indicates the rate at which queries are sent to the server.

Queries/Sec

This is an indicator of server workload.

Slow queries:

Indicates the number of queries that have taken more than the ‘long_query_time’ for execution, during the last measurement period.

Number

This value should ideally be 0. If it remains consistently high, the administrator should look to identify and optimize the slow queries.

Handler read first:

Indicates the number of times the first entry was read from an index during the last measurement period.

Number

If the value of this measure is high, it suggests that the server is doing a lot of full index scans.

Handler read key:

Indicates the number of requests that were received in the last measurement period, to read a row based on a key.

Number

If the value of this measure is high, it indicates that your queries and tables are properly indexed.

Handler read next:

Indicates the number of requests received in the last measurement period, to read the next row in the key order.

Number

This will be incremented if you are querying an index column with a range constraint. This will also be incremented if you are doing an index scan.

Handler read prev:

Indicates the number of requests received in the last measurement period, to read the previous row in the key order.

Number

This is mainly used to optimize ORDER BY... DESC.

Handler read rnd:

Indicates the number of requests received in the last measurement period, to read a row based on a fixed position.

Number

This will be high if you are executing a lot of queries that require sorting of the result. If the value of this measure is high,  then you probably have a lot of  queries that require MySQL to scan whole tables or you have joins that do not use keys properly.

Handler read rnd next:

Indicates the number of requests received in the last measurement period, to read the next row in the datafile.

Number

This will be high if you are performing a lot of table scans. Generally, this suggests that your tables are not properly indexed or that your queries are not written to use the indexes properly.