Configuration – read/write splitting
In this section, we will introduce you to DistSQL's management syntax for read/write splitting rules:
- First, let's create the read/write splitting rules:
CREATE READWRITE_SPLITTING RULE ruleName ( WRITE_RESOURCE=resourceName, READ_RESOURCES(resourceName [ , resourceName] *), TYPE(NAME=algorithmName, PROPERTIES("key"="value" [, "key"="value" ]* ) );
This is the standard syntax of the read/write splitting rule. The DistSQL syntax with read/write splitting also provides configuration methods for dynamic data sources.
To modify the syntax of the read/write splitting rule, replace CREATE
with ALTER
and keep the other parts unchanged.
- Next, we will learn how to drop read/write splitting rules. The delete syntax is as follows:
DROP READWRITE_SPLITTING RULE ruleName, [ruleName]*
- Now, let...