You can use the real-time session feature of DBbrain to view the real-time session information of your instance, including performance monitoring, connection monitoring, running thread monitoring, SQL throttling, and hotspot update protection. This document describes how to use the real-time session feature.
Currently, the real-time session feature (including SQL throttling and hotspot update protection) is supported only for TencentDB for MySQL (excluding the basic single-node instances).
Log in to the DBbrain console and select Performance Optimization on the left sidebar. On the displayed page, select a database at the top and select the Real-Time Session tab.
This section visually displays the
SHOW PROCESSLIST command execution result of your database instance, and the displayed data is refreshed once every 15 seconds by default. You can filter data based on your needs using the following dimensions:
DBbrain supports killing sessions in the console for ease of management. In the "Running Threads" section, you can select the lines of sessions in the list and click Kill Session in the upper-right corner to kill them.
DBbrain provides the feature of killing threads during a period including setting of killing threads during a period and thread preview.
- You can set one or more conditions which are evaluated using the logical AND operator.
- If only "Time" and "Duration" are filled in, all threads that meet the conditions will be killed with one click.
SQL throttling is supported only for TencentDB for MySQL (excluding the Basic Edition).
DBbrain supports the SQL throttling feature to ensure service availability. You can create SQL throttling tasks to control the database requests and SQL concurrency by setting the SQL type, maximum concurrency, throttling duration, and SQL keywords. Multiple tasks do not conflict with each other.
- To create a SQL throttling task, you need to log in to the database account first.
- If SQL throttling prevents a SQL statement from being executed, the error message
SQL rejected by CDB_SQL_FILTERwill be displayed.
ANDoperator. Commas are not keywords.
In the "SQL Throttling" tab, the list displays the SQL type, status, keywords, start time, remaining time, maximum concurrency, and operations.
Hotspot update protection is supported only for TencentDB for MySQL (excluding the Basic Edition).
DBbrain provides the hot update protection feature. According to the statement queuing mechanism, the hot update protection feature queues the statements with the same conflict in the memory queue. The hot update protection feature reduces the overhead of lock conflict and improves the database performance in high concurrency scenarios.
In the "Hotspot Update Protection" tab, click Create Task to create a hotspot update protection task. You can set the wait timeout threshold and execution mode (scheduled stop or manual stop). If the scheduled stop is set as the execution mode, you can set the execution time.
In the "Hotspot Update Protection" tab, the list displays the status, start time, execution time, remaining time, wait timeout threshold, and operations.