Updated on 2024-05-21 GMT+08:00

Testing Read/Write Splitting Performance

After a proxy instance is created, you can connect your GaussDB(for MySQL) instance through a proxy address. You can use internal SQL commands to verify the read/write splitting performance.

Procedure

  1. Log in to an ECS.
  2. Connect to a DB instance through a proxy address.

    mysql -h <hostIP> -P <port> -u <userName> -p <password>

    Table 1 Parameter description

    Parameter

    Description

    <hostIP>

    Proxy address.

    <port>

    Database port. By default, the value is 3306.

    <userName>

    Username of the GaussDB(for MySQL) database administrator account. The default username is root.

    <password>

    Password

  3. Run the following command to view the instance that executes the SQL command:

    Run show last route; to view the routing result of the previous SQL statement.
    Figure 1 Query result

    Do not use show last route for service code or multi-statement execution.