This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 4be47893054 Add sql federation use document (#29778)
4be47893054 is described below
commit 4be478930542ed5cc58d987e96e2f496276e9526
Author: niu niu <[email protected]>
AuthorDate: Sat Jan 20 09:09:44 2024 +0800
Add sql federation use document (#29778)
* Add sql federation use document
* Fix
* Change document
---
.../content/features/sql-federation/_index.cn.md | 29 ++++++++++
.../content/features/sql-federation/_index.en.md | 34 ++++++++++++
.../features/sql-federation/limitation.cn.md | 6 +++
.../features/sql-federation/limitation.en.md | 6 +++
.../java-api/rules/sql-federation.cn.md | 45 ++++++++++++++++
.../java-api/rules/sql-federation.en.md | 45 ++++++++++++++++
.../yaml-config/rules/sql-federation.cn.md | 35 ++++++++++++
.../yaml-config/rules/sql-federation.en.md | 35 ++++++++++++
.../global-rule/alter-sql-federation-rule.cn.md | 62 ++++++++++++++++++++++
.../global-rule/alter-sql-federation-rule.en.md | 62 ++++++++++++++++++++++
.../ral/global-rule/show-sql-federation-rule.cn.md | 56 +++++++++++++++++++
.../ral/global-rule/show-sql-federation-rule.en.md | 56 +++++++++++++++++++
.../distsql/syntax/reserved-word.cn.md | 3 +-
.../distsql/syntax/reserved-word.en.md | 3 +-
.../shardingsphere-proxy/yaml-config/rules.cn.md | 9 ++++
.../shardingsphere-proxy/yaml-config/rules.en.md | 9 ++++
16 files changed, 493 insertions(+), 2 deletions(-)
diff --git a/docs/document/content/features/sql-federation/_index.cn.md
b/docs/document/content/features/sql-federation/_index.cn.md
new file mode 100644
index 00000000000..5a11571c508
--- /dev/null
+++ b/docs/document/content/features/sql-federation/_index.cn.md
@@ -0,0 +1,29 @@
++++
+pre = "<b>3.11. </b>"
+title = "联邦查询"
+weight = 11
+chapter = true
++++
+
+## 背景
+
+当用户使用数据分片对海量数据进行水平拆分时,虽然能够有效解决数据库性能瓶颈,但业务上也因此带来了一些新的问题。
+例如以下场景:跨节点关联查询、子查询、分页、排序、聚合查询。在进行业务实现时需要注意查询 SQL
的使用范围,尽量避免跨数据库实例查询,这使得业务层面的功能受到了数据库的限制。
+
+## 挑战
+
+用户业务查询 SQL 往往是复杂多变的,通过业务 SQL 改造接入 ShardingSphere 成本较大。
+将业务端原有的查询,转换为分布式查询并在分布式查询场景下进行相应的 SQL 优化,能够在跨数据库实例的情况下完成:关联查询、子查询、分页、排序、聚合查询。
+在业务实现上能够让研发人员不必再关心 SQL 的使用范围,能够专注于业务功能开发,减少业务层面的功能限制。
+
+## 目标
+
+实现跨数据库实例查询的分布式 SQL,是 Apache ShardingSphere 联邦查询的主要设计目标。
+
+## 应用场景
+
+当需要进行跨数据库关联查询,子查询,以及聚合查询。不需要改动 SQL,通过配置开启联邦查询即可完成分布式查询语句的执行。
+
+## 相关参考
+
+-
[联邦查询的配置](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
diff --git a/docs/document/content/features/sql-federation/_index.en.md
b/docs/document/content/features/sql-federation/_index.en.md
new file mode 100644
index 00000000000..b951d10b0f2
--- /dev/null
+++ b/docs/document/content/features/sql-federation/_index.en.md
@@ -0,0 +1,34 @@
++++
+pre = "<b>3.11. </b>"
+title = "SQL Federation"
+weight = 11
+chapter = true
++++
+
+## Background
+
+When users use data sharding to horizontally split massive amounts of data,
although it can effectively solve database performance bottlenecks, it also
brings some new problems in business.
+
+For example, in the following scenarios: cross database association queries,
sub queries, pagination, sorting, aggregation queries.
+
+When implementing business operations, it is important to pay attention to the
usage range of SQL queries and avoid cross database instance queries as much as
possible, which limits the functionality of the business at the database level.
+
+## Challenges
+
+User business queries in SQL are often complex and variable, and it is costly
to integrate them into ShardingSphere through business SQL transformation.
+
+Convert the original queries on the business side into distributed queries and
perform corresponding SQL optimization in distributed query scenarios, which
can be completed across database instances: associated queries, sub queries,
pagination, sorting, and aggregation queries.
+
+In terms of business implementation, it can enable R&D personnel to no longer
care about the scope of SQL usage, focus on business function development, and
reduce functional limitations at the business level.
+
+## Goal
+
+Implementing distributed SQL for cross database instance queries is the main
design goal of Apache ShardingSphere federated queries.
+
+## Application Scenario
+
+When cross database association queries, sub queries, and aggregate queries
are required. No need to modify SQL, enabling federated queries through
configuration can complete the execution of distributed query statements.
+
+## Related References
+
+- [SQL Federation
Configuration](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
diff --git a/docs/document/content/features/sql-federation/limitation.cn.md
b/docs/document/content/features/sql-federation/limitation.cn.md
new file mode 100644
index 00000000000..c71cf80de03
--- /dev/null
+++ b/docs/document/content/features/sql-federation/limitation.cn.md
@@ -0,0 +1,6 @@
++++
+title = "使用限制"
+weight = 1
++++
+
+Apache ShardingSphere 的联邦查询处于实验阶段。
diff --git a/docs/document/content/features/sql-federation/limitation.en.md
b/docs/document/content/features/sql-federation/limitation.en.md
new file mode 100644
index 00000000000..4f94be3840f
--- /dev/null
+++ b/docs/document/content/features/sql-federation/limitation.en.md
@@ -0,0 +1,6 @@
++++
+title = "Limitations"
+weight = 1
++++
+
+The SQL federation query of Apache ShardingSphere is experimental.
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.cn.md
new file mode 100644
index 00000000000..7df966a1f69
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.cn.md
@@ -0,0 +1,45 @@
++++
+title = "联邦查询"
+weight = 13
++++
+
+## 背景信息
+
+该功能为**实验性功能,暂不适合核心系统生产环境使用**。
+当关联查询中的多个表分布在不同的数据库实例上时,通过开启联邦查询可以进行跨库关联查询,以及子查询。
+
+## 参数解释
+
+类名称:org.apache.shardingsphere.sqlfederation.api.config.SQLFederationRuleConfiguration
+
+可配置属性:
+
+| *名称* | *数据类型* | *说明* | *默认值* |
+|-----------------------|---------|-------------------|-------|
+| sqlFederationEnabled | boolean | 是否开启联邦查询 | - |
+| allQueryUseSQLFederation | boolean | 是否全部查询 SQL 使用联邦查询 | - |
+| executionPlanCache | org.apache.shardingsphere.sql.parser.api.CacheOption |
执行计划缓存 | - |
+
+## 本地缓存配置
+
+类名称:org.apache.shardingsphere.sql.parser.api.CacheOption
+
+可配置属性:
+
+| *名称* | *数据类型* | *说明* | *默认值* |
+|-----------------|--------|------------|---------------------|
+| initialCapacity | int | 执行计划缓存初始容量 | 执行计划本地缓存初始默认值 2000 |
+| maximumSize | long | 执行计划缓存最大容量 | 执行计划本地缓存最大默认值 65535 |
+
+## 配置示例
+
+```java
+private SQLFederationRuleConfiguration createSQLFederationRuleConfiguration() {
+ CacheOption executionPlanCache = new CacheOption(2000, 65535L);
+ return new SQLFederationRuleConfiguration(true, false, executionPlanCache);
+}
+```
+
+## 相关参考
+
+- [YAML
配置:联邦查询](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.en.md
new file mode 100644
index 00000000000..5370d6c06b8
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation.en.md
@@ -0,0 +1,45 @@
++++
+title = "SQL-federation"
+weight = 13
++++
+
+## Background
+
+This function is an **experimental one and is currently not suitable for use
in core system production environments**.
+When multiple tables in a join query are distributed across different database
instances, enabling federated query allows for cross-database join queries, as
well as subqueries.
+
+## Parameters
+
+Class:
org.apache.shardingsphere.sqlfederation.api.config.SQLFederationRuleConfiguration
+
+Attributes:
+
+| *name* | *DataType* | *Description* |
*Default Value* |
+|---------------------|---------|-------------------|-------|
+| sqlFederationEnabled | boolean | SQL federation enabled
configuration | - |
+| allQueryUseSQLFederation | boolean | all query use SQL federation
configuration | - |
+| executionPlanCache | org.apache.shardingsphere.sql.parser.api.CacheOption |
execution plan cache configuration | - |
+
+## Cache option Configuration
+
+Class: org.apache.shardingsphere.sql.parser.api.CacheOption
+
+Attributes:
+
+| *name* | *DataType* | *Description* | *Default Value*
|
+|-----------------|--------|-----------------------|--------------------------------------------------------|
+| initialCapacity | int | Initial capacity of local cache | execution plan
local cache default value of 2000 |
+| maximumSize | long | Maximum capacity of local cache | execution plan
local cache maximum default value 65535 |
+
+## Sample
+
+```java
+private SQLFederationRuleConfiguration createSQLFederationRuleConfiguration() {
+ CacheOption executionPlanCache = new CacheOption(2000, 65535L);
+ return new SQLFederationRuleConfiguration(true, false, executionPlanCache);
+}
+```
+
+## Related References
+
+- [YAML Configuration:SQL
Federation](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.cn.md
new file mode 100644
index 00000000000..8d40cbb651d
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.cn.md
@@ -0,0 +1,35 @@
++++
+title = "联邦查询"
+weight = 13
++++
+
+## 背景信息
+
+该功能为**实验性功能,暂不适合核心系统生产环境使用**。
+联邦查询 YAML 配置方式可读性高,当关联查询中的多个表分布在不同的数据库实例上时,通过开启联邦查询可以进行跨库关联查询,以及子查询。
+
+## 参数解释
+
+```yaml
+sqlFederation:
+ sqlFederationEnabled: # 是否开启联邦查询
+ allQueryUseSQLFederation: # 是否全部查询 SQL 使用联邦查询
+ executionPlanCache: # 执行计划缓存
+ initialCapacity: 2000 # 执行计划缓存初始容量
+ maximumSize: 65535 # 执行计划缓存最大容量
+```
+
+## 配置示例
+
+```yaml
+sqlFederation:
+ sqlFederationEnabled: true
+ allQueryUseSQLFederation: false
+ executionPlanCache:
+ initialCapacity: 2000
+ maximumSize: 65535
+```
+
+## 相关参考
+
+- [JAVA
API:联邦查询](/cn/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation/)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.en.md
new file mode 100644
index 00000000000..19f4c58888b
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation.en.md
@@ -0,0 +1,35 @@
++++
+title = "SQL Federation"
+weight = 13
++++
+
+## Background
+
+This function is an **experimental one and is currently not suitable for use
in core system production environments**.
+When multiple tables in a join query are distributed across different database
instances, enabling federated query allows for cross-database join queries, as
well as subqueries.
+
+## Parameters
+
+```yaml
+sqlFederation:
+ sqlFederationEnabled: # SQL federation enabled configuration
+ allQueryUseSQLFederation: # all query use SQL federation configuration
+ executionPlanCache: # execution plan cache configuration
+ initialCapacity: 2000 # execution plan local cache initial capacity
+ maximumSize: 65535 # execution plan local cache maximum size
+```
+
+## Sample
+
+```yaml
+sqlFederation:
+ sqlFederationEnabled: true
+ allQueryUseSQLFederation: false
+ executionPlanCache:
+ initialCapacity: 2000
+ maximumSize: 65535
+```
+
+## Related References
+
+- [JAVA API: SQL
Federation](/en/user-manual/shardingsphere-jdbc/java-api/rules/sql-federation/)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.cn.md
new file mode 100644
index 00000000000..62d8c4642fa
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.cn.md
@@ -0,0 +1,62 @@
++++
+title = "ALTER SQL_FEDERATION RULE"
+weight = 9
++++
+
+### 描述
+
+`ALTER SQL_FEDERATION RULE` 语法用于修改联邦查询配置。
+
+### 语法
+
+{{< tabs >}}
+{{% tab name="语法" %}}
+```sql
+AlterSQLFederationRule ::=
+ 'ALTER' 'SQL_FEDERATION' 'RULE' sqlFederationRuleDefinition
+
+sqlFederationRuleDefinition ::=
+ '(' sqlFederationEnabled? allQueryUseSQLFederation? (','?
executionPlanCache)? ')'
+
+sqlFederationEnabled ::=
+ 'SQL_FEDERATION_ENABLED' '=' boolean_
+
+allQueryUseSQLFederation ::=
+ 'ALL_QUERY_USE_SQL_FEDERATION' '=' boolean_
+
+executionPlanCache ::=
+ 'EXECUTION_PLAN_CACHE' '(' cacheOption ')'
+
+cacheOption ::=
+ ('INITIAL_CAPACITY' '=' initialCapacity)? (',' 'MAXIMUM_SIZE' '='
maximumSize)?
+
+initialCapacity ::=
+ int
+
+maximumSize ::=
+ int
+
+boolean_ ::=
+ TRUE | FALSE
+```
+{{% /tab %}}
+{{% tab name="铁路图" %}}
+<iframe frameborder="0" name="diagram" id="diagram" width="100%"
height="100%"></iframe>
+{{% /tab %}}
+{{< /tabs >}}
+
+### 示例
+
+- 修改联邦查询配置
+
+```sql
+ALTER SQL_FEDERATION RULE (SQL_FEDERATION_ENABLED=TRUE
ALL_QUERY_USE_SQL_FEDERATION=TRUE EXECUTION_PLAN_CACHE(INITIAL_CAPACITY=1024
MAXIMUM_SIZE=65535));
+```
+
+### 保留字
+
+`ALTER`、`SQL_FEDERATION`、`RULE`、`SQL_FEDERATION_ENABLED`、`ALL_QUERY_USE_SQL_FEDERATION`、`EXECUTION_PLAN_CACHE`、`INITIAL_CAPACITY`、`MAXIMUM_SIZE`
+
+### 相关链接
+
+- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.en.md
new file mode 100644
index 00000000000..c54b0869978
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/alter-sql-federation-rule.en.md
@@ -0,0 +1,62 @@
++++
+title = "ALTER SQL_FEDERATION RULE"
+weight = 9
++++
+
+### Description
+
+The `ALTER SQL_FEDERATION RULE` syntax is used to modify the federated query
configuration.
+
+### Syntax
+
+{{< tabs >}}
+{{% tab name="Grammar" %}}
+```sql
+AlterSQLFederationRule ::=
+ 'ALTER' 'SQL_FEDERATION' 'RULE' sqlFederationRuleDefinition
+
+sqlFederationRuleDefinition ::=
+ '(' sqlFederationEnabled? allQueryUseSQLFederation? (','?
executionPlanCache)? ')'
+
+sqlFederationEnabled ::=
+ 'SQL_FEDERATION_ENABLED' '=' boolean_
+
+allQueryUseSQLFederation ::=
+ 'ALL_QUERY_USE_SQL_FEDERATION' '=' boolean_
+
+executionPlanCache ::=
+ 'EXECUTION_PLAN_CACHE' '(' cacheOption ')'
+
+cacheOption ::=
+ ('INITIAL_CAPACITY' '=' initialCapacity)? (',' 'MAXIMUM_SIZE' '='
maximumSize)?
+
+initialCapacity ::=
+ int
+
+maximumSize ::=
+ int
+
+boolean_ ::=
+ TRUE | FALSE
+```
+{{% /tab %}}
+{{% tab name="Railroad diagram" %}}
+<iframe frameborder="0" name="diagram" id="diagram" width="100%"
height="100%"></iframe>
+{{% /tab %}}
+{{< /tabs >}}
+
+### Example
+
+- Alter SQL Federation rule
+
+```sql
+ALTER SQL_FEDERATION RULE (SQL_FEDERATION_ENABLED=TRUE
ALL_QUERY_USE_SQL_FEDERATION=TRUE EXECUTION_PLAN_CACHE(INITIAL_CAPACITY=1024
MAXIMUM_SIZE=65535));
+```
+
+### Reserved word
+
+`ALTER`、`SQL_FEDERATION`、`RULE`、`SQL_FEDERATION_ENABLED`、`ALL_QUERY_USE_SQL_FEDERATION`、`EXECUTION_PLAN_CACHE`、`INITIAL_CAPACITY`、`MAXIMUM_SIZE`
+
+### Related links
+
+- [Related
links](/en/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.cn.md
new file mode 100644
index 00000000000..7a22502915c
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.cn.md
@@ -0,0 +1,56 @@
++++
+title = "SHOW SQL_FEDERATION RULE"
+weight = 8
++++
+
+### 描述
+
+`SHOW SQL_FEDERATION RULE` 语法用于查询联邦查询配置。
+
+### 语法
+
+{{< tabs >}}
+{{% tab name="语法" %}}
+```sql
+ShowSQLFederationRule ::=
+ 'SHOW' 'SQL_FEDERATION' 'RULE'
+```
+{{% /tab %}}
+{{% tab name="铁路图" %}}
+<iframe frameborder="0" name="diagram" id="diagram" width="100%"
height="100%"></iframe>
+{{% /tab %}}
+{{< /tabs >}}
+
+### 返回值说明
+
+| 列 | 说明 |
+|----------|-------------------|
+| sql_federation_enabled | 是否开启联邦查询 |
+| all_query_use_sql_federation | 是否全部查询 SQL 使用联邦查询 |
+| execution_plan_cache | 执行计划缓存 |
+
+### 示例
+
+- 查询联邦查询配置
+
+```sql
+SHOW SQL_FEDERATION RULE;
+```
+
+```sql
+mysql> show sql_federation rule;
++------------------------+------------------------------+-------------------------------------------+
+| sql_federation_enabled | all_query_use_sql_federation | execution_plan_cache
|
++------------------------+------------------------------+-------------------------------------------+
+| true | false | initialCapacity:
2000, maximumSize: 65535 |
++------------------------+------------------------------+-------------------------------------------+
+1 row in set (0.31 sec)
+```
+
+### 保留字
+
+`SHOW`、`SQL_FEDERATION`、`RULE`
+
+### 相关链接
+
+- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.en.md
new file mode 100644
index 00000000000..1b745559f48
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/global-rule/show-sql-federation-rule.en.md
@@ -0,0 +1,56 @@
++++
+title = "SHOW SQL_FEDERATION RULE"
+weight = 8
++++
+
+### Description
+
+The `SHOW SQL_FEDERATION RULE` syntax is used to query the federated query
configuration.
+
+### Syntax
+
+{{< tabs >}}
+{{% tab name="Grammar" %}}
+```sql
+ShowSQLFederationRule ::=
+ 'SHOW' 'SQL_FEDERATION' 'RULE'
+```
+{{% /tab %}}
+{{% tab name="Railroad diagram" %}}
+<iframe frameborder="0" name="diagram" id="diagram" width="100%"
height="100%"></iframe>
+{{% /tab %}}
+{{< /tabs >}}
+
+### Return Value Description
+
+| Column | Description |
+|------------------------------|--------------------------------------------|
+| sql_federation_enabled | SQL federation enabled configuration |
+| all_query_use_sql_federation | all query use SQL federation configuration |
+| execution_plan_cache | execution plan cache configuration |
+
+### Example
+
+- Query sql federation rule configuration
+
+```sql
+SHOW SQL_FEDERATION RULE;
+```
+
+```sql
+mysql> show sql_federation rule;
++------------------------+------------------------------+-------------------------------------------+
+| sql_federation_enabled | all_query_use_sql_federation | execution_plan_cache
|
++------------------------+------------------------------+-------------------------------------------+
+| true | false | initialCapacity:
2000, maximumSize: 65535 |
++------------------------+------------------------------+-------------------------------------------+
+1 row in set (0.31 sec)
+```
+
+### Reserved word
+
+`SHOW`、`SQL_FEDERATION`、`RULE`
+
+### Related links
+
+- [Related
links](/en/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.cn.md
index 61ba559c22b..3a1b4207022 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.cn.md
@@ -103,7 +103,8 @@ weight = 5
、`COMMIT`、`INFO`、`MODE`、`DIST`、`VARIABLE`、`VARIABLES`、`WHERE`、`DROPSET`、`SET`、`HINT`、`SOURCE`、`ADD`
、`SHARDING`、`STORAGE`、`UNIT`、`USER`、`PASSWORD`、`REFRESH`、`METADATA`、`TABLE`、`DATABASE`、`GOVERNANCE`、`CENTER`
、`EXPORT`、`CONFIGURATION`、`TO`、`FILE`、`IMPORT`、`USED`, `IMPLEMENTATIONS`,
`OF`, `KEY`, `GENERATE`, `ALGORITHM`
-、`QUERY`、`LOAD`、`BALANCE`
+、`QUERY`、`LOAD`、`BALANCE`, `FEDERATION`, `SQL_FEDERATION_ENABLED`,
`ALL_QUERY_USE_SQL_FEDERATION`
+、`EXECUTION_PLAN_CACHE`
## RUL
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.en.md
index 7c7c97863b1..33e661e16f9 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word.en.md
@@ -104,7 +104,8 @@ weight = 5
, `STOP`, `START`, `ROLLBACK`, `COMMIT`, `INFO`, `MODE`, `DIST`, `VARIABLE`,
`VARIABLES`, `WHERE`, `DROPSET`
, `SET`, `HINT`, `SOURCE`, `ADD`, `SHARDING`, `STORAGE`, `UNIT`, `USER`,
`PASSWORD`, `REFRESH`, `METADATA`, `TABLE`
, `DATABASE`, `GOVERNANCE`, `CENTER`, `EXPORT`, `CONFIGURATION`, `TO`, `FILE`,
`IMPORT`, `USED`, `IMPLEMENTATIONS`, `OF`
-, `KEY`, `GENERATE`, `ALGORITHM`, `QUERY`, `LOAD`, `BALANCE`
+, `KEY`, `GENERATE`, `ALGORITHM`, `QUERY`, `LOAD`, `BALANCE`, `FEDERATION`,
`SQL_FEDERATION_ENABLED`
+, `ALL_QUERY_USE_SQL_FEDERATION`, `EXECUTION_PLAN_CACHE`
## RUL
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
index bed74b3014a..0d4d205e318 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.cn.md
@@ -37,3 +37,12 @@ sqlTranslator:
type:
useOriginalSQLWhenTranslatingFailed:
```
+* [联邦查询](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
+```yaml
+sqlFederation:
+ sqlFederationEnabled: true
+ allQueryUseSQLFederation: false
+ executionPlanCache:
+ initialCapacity: 2000
+ maximumSize: 65535
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
index bb17c4994e8..a5b25894bcf 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/rules.en.md
@@ -38,3 +38,12 @@ sqlTranslator:
type:
useOriginalSQLWhenTranslatingFailed:
```
+* [SQL
Federation](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-federation/)
+```yaml
+sqlFederation:
+ sqlFederationEnabled: true
+ allQueryUseSQLFederation: false
+ executionPlanCache:
+ initialCapacity: 2000
+ maximumSize: 65535
+```