Updated on 2024-01-17 GMT+08:00

Example for Using PoWA

PoWA can collect and display various performance metrics. This example describes how to view a slow SQL statement.

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, locate the target DB instance and click Log In in the Operation column.

    Alternatively, click the instance name on the Instances page. On the displayed Basic Information page, click Log In in the upper right corner of the page.

  5. On the displayed login page, enter the correct username and password and click Log In.
  6. In the database list of the Home page, click Create Database.
  7. On the displayed page, enter a database name test and select a character set.
  8. Choose SQL Operations > SQL Query to execute a slow SQL statement, for example, SELECT pg_sleep($1), in the test database.
  9. After about 5 minutes, on the PoWA home page, select the target DB instance and select the test database.

    Figure 1 PoWA home page

    In Details for all queries, view that the execution time of the SELECT pg_sleep($1) statement is 20s.