Configuring SQL Throttling for a Standard HTAP Instance
Scenarios
SQL throttling addresses the issue of HTAP instance instability caused by complex SQL statements executed in heavy-traffic scenarios. You can set a SQL blacklist rule to restrict complex SQL statements.
Constraints
- Rule application scope: This rule is only available to SELECT statements.
- Rule syntax: The regular expression syntax is used. Any SQL statement that matches a regular expression pattern will be blocked.
- Escape characters: SQL statements may contain characters with special meanings in regular expressions, such as ( and *. To avoid confusion, use \\ to escape special characters. For example, to block the count(*) operation, enter the following rule: select count\\(\\*\\) from .+.
- Case sensitivity: Regular expressions are case-insensitive. This is true for all keywords and identifiers in SQL statements.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, locate a TaurusDB instance and click its name to access the Basic Information page.
- In the navigation pane, choose HTAP Analysis.
- Click the name of an HTAP instance to access the Basic Information page.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then SQL Throttling.
- On the displayed page, toggle on Enable SQL Throttling.
Figure 1 Enabling SQL throttling
- Click Add Rule and enter a blacklist rule. Only SELECT statements can be added to the blacklist rule. SQL statements in the blacklist rule will be restricted. You do not need to enter a semicolon (;) at the end.
Figure 2 Adding a SQL throttling rule
- Confirm the settings and click OK.
Deleting a Throttling Rule
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, locate a TaurusDB instance and click its name to access the Basic Information page.
- In the navigation pane, choose HTAP Analysis.
- Click the name of an HTAP instance to access the Basic Information page.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then SQL Throttling.
- Locate a SQL throttling rule and click Delete in the Operation column.
Alternatively, select one or more throttling rules and click Delete above the list.
- In the displayed dialog box, confirm the information about the throttling rule to be deleted and click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot