MySQL Top Tables By Records Test

In an effort to track the growth of individual databases, administrators may want to time and again check how many rows of data each table in a database contains. In the process, they will be able to identify those tables with more than a permissible number of records. Based on this finding, they can then decide whether deletion of a few or more unnecessary records from these ‘large tables’ can keep database growth under check. The MySQL Table Record Count test helps administrators in this exercise. This test automatically discovers those tables in a given database that contain more than a configured number of records, and reports the number of records fetched from each such table.

To enable the test, go to the enable / disable tests page using the menu sequence : Agents -> Tests -> Enable/Disable, pick MySQL as the Component type, Performance as the Test type, choose the test from the disabled tests list, and click on the << button to move the test to the ENABLED TESTS list. Finally, click the Update button.

Target of the test : A MySQL server

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for each of the tables with a record count that exceeds the table rows configuration

Configurable parameters for the test
  1. TEST PERIOD – How often should the test be executed
  2. Host – The IP address of the MySQL server
  3. Port – The port on which the server is listening
  4. db – the name of a database on the server
  5. Usernameand 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.
  6. Confirm password – Confirm the password by retyping it here.
  7. TABLE ROWS - Specify the number of records beyond which this test will consider a table as a large table.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Total records:

Indicates the number of records fetched from this table.


Compare the values of this measure across the tables to know which table has the maximum number of records.