Help Center/ GaussDB/ FAQs/ Database Parameter Modification/ How Do I Set the Maximum Number of Bytes to Be Logged for Each SQL Statement in GaussDB?
Updated on 2024-11-11 GMT+08:00

How Do I Set the Maximum Number of Bytes to Be Logged for Each SQL Statement in GaussDB?

The track_activity_query_size parameter specifies the maximum number of bytes that can be logged for each SQL statement. If the number of bytes of a SQL statement exceeds the specified parameter value, the SQL statement will be truncated. Setting this parameter to a large value can lead to excessive memory usage, potentially causing the system to run out of memory. You are advised to set this parameter to a value no more than 4096.

You can set the maximum number of bytes to be logged for each SQL statement in a centralized instance on the GaussDB console. Specifically, perform the following operations:

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB.
  4. On the Instances page, click the name of the target instance to go to the Basic Information page.
  5. In the navigation pane on the left, choose Parameters.
  6. Search for the track_activity_query_size parameter in the search box.
  7. Change the parameter value and click Save. The value ranges from 100 to 102,400.
  8. In the displayed dialog box, click OK.