Database Management

Overview

You can go to the Database Management page using either of the following methods:

  • In the database list of the Home page, locate the target database and click Manage in the Operation column.
  • Select Database Management on the top menu bar.
Figure 1 Database Management
Table 1 Functions

No.

Description

1

Displays the name of the current database.

2

Allows you to switch between system and non-system databases.

3

Displays the IP address, port number, and character set of the current DB instance.

4

Allows you to click SQL Window to go to the SQL window of the current database.

Allows you to click Data Dictionary to open the data dictionary file of the current database.

5

Periodically collects metadata such as databases, tables, and fields of the DB instance and stores the data to the databases of DAS.

  • Reduces queries on user databases and the impact on the performance of user databases.
  • Improves the search performance for DB instances that contain a large number of tables and supports pagination queries.

Only structural metadata is collected, which means that user's table data is not included.

6

Displays three functional modules: Objects, SQL Tuning, and Metadata Collection.

7

Allows you to perform operations.

Objects

You can manage tables, views, stored procedures, events, triggers, and functions of the MySQL DB instances. The main operations include creating, querying, and modifying objects.

SQL Tuning

SQL tuning helps you query the SQL statements that are executed frequently, consume a large amount of resources, or take a long time to execute. Therefore, you can optimize operations according to the diagnosis results.

  1. On the Database Management page, click the SQL Tuning tab. You can search for SQL tuning history by date to view details or you can add or delete SQL tuning records.

    Figure 2 SQL Tuning

  2. Click Add SQL Performance Tuning. In the displayed dialog box, choose to tune SQL statements or SQL file. If you select SQL statement for Task Type, enter the SQL statements and click OK. The tuning results can be viewed in the SQL tuning list.

    Figure 3 Adding a SQL performance tuning task
    • The following types of statements will be changed to the SELECT statements for tuning:

      SELECT ... FOR UPDATE, UPDATE ... SET ... WHERE ..., DELETE FROM ... WHERE ..., INSERT INTO ... SELECT ...

    • Apart from the statements mentioned above, other statements cannot be changed to SELECT statements for tuning. The tuning task that contains unsupported SQL syntax will fail.
    • The following shows the unsupported syntaxes:
    1. alter table t add index idx_name(name)
    2. show databases
    3. grant SELECT,PROCESS on d.t to 'am'@'%' with grant option
    4. insert into t(i, v) values (1, 'a')
    5. Only MySQL InnoDB is supported.
    6. Only the tuning of the SELECT/INSERT/UPDATE/DELETE statements is supported. An INSERT statement must contain a SELECT clause.
    7. Querying stored SQL statements such as information_schema, test, mysql, is not supported.
    8. View statements are not supported.

  3. In the SQL tuning list, locate the target task and click View Details in the Operation column.

    Figure 4 Viewing task details
    Figure 5 Task details

    You can view the tuning details at the bottom of the task list.

    Figure 6 Tuning details