Skip to main content

Database size

Home > Select Project > Stat/Report > DB size

It aggregates the sizes of tables for each database and provides trend data in a chart. You can identify and manage the trend in database capacity growth. You can prepare for rapid capacity increases by identifying them in advance.

Database size can affect the performance. You can prepare to troubleshoot performance issues because the increase in size can delay the query execution. It is also required to identify and prevent problems in advance that may increase the size due to incorrect queries or database structure issues.

The trend in database size helps you understand usage patterns and data growth. You can predict future capacity requirements and take possible actions. Monitoring these changes helps you optimize the resources and costs.

Before use

Assigning the query role

MySQL database size can be seen in information_schema.tables, and the monitoring account must have the table search role for aggregation. Role settings are required as follows.

grant select on {DB_NAME}.* to whatap;
Note
  • If the database is information_schema, performance_schema, sys, or mysql, the database size is not collected.

  • The collection cycle is collected once every hour.

Setting the agent options

You can set the following agent options to collect the database sizes.

  • tables Boolean

    Default true

    It collects the table sizes. In Stat/Report > DB size, you can see the table size by selecting the database.

  • tables_hour Int

    Default 5

    Set the time when data is to be collected to store the table sizes. The default value is 5 and collection starts at 5 AM.

  • tables_min_row Int

    Default 10000

    When collecting the table information, table data with the number of rows smaller than the set value is not collected.

  • table_filesize Boolean

    Default true

    When collecting the table size, the file_size of innodb_tablespaces is also collected.

Basic screen guide

Database size

  1. Set the time to search in Time. You can also select a lookup time by clicking the green button.

  2. Select a target to view in Instance.

  3. Select Search icon.

Checking the changes over time

Database size

  • Size trend

    You can visually see the changes in the total size and usage of the database over time. The chart displays the sizes for each database in different color. Hover your mouse over the chart and move it left and right to view the details. You can see information details on the sizes for each database at a specific time point through the tooltip.

  • Size details

    It provides capacity details for each database in a table format. You can check the names (DB NAME) for each database, total capacity (TOTAL), and changed amount (CHANGED). If you select a database, you can see information details in the Table size (TOP 50) section.

Checking the sizes for each table

If you select a database in the Size details section, you can check the list of sizes for each table corresponding to the top 50 sizes in the database.

Database Size

It displays the data size (DATA SIZE), index size (INDEX SIZE), and number of rows (ROWS) for each table in the database by default. You can check the changes in the start time and end time for the query. This allows you to easily detect large tables and supports management efforts for capacity optimization.

Note
  • The information in the Size details section may differ from the actual size because it is the information on information_schema.tables. To check the file size (FILE SIZE) of information_schema.innodb_tablespaces, set the following option to the DBX agent. This size is close to the actual size.

    whatap.conf
    table_filesize=true
  • It targets the tables for which the monitoring account has the query role. For more information about the monitoring account creation, see the following.

When you select the TABLENAME column in the table list of the Table size (TOP 50) section, the Object Detail window appears, where you can check the configuration of column and index.

Note
  • To change the order of table columns or hide specific columns in the Table size (TOP 50) section, select Column icon on the upper right. For more information about the column configuration, see the following.

Downloading the viewed data

You can download the searched data as a CSV format file. Select Download icon and then select Size details or Table size (TOP 50).