This is an automated email from the ASF dual-hosted git repository.
cambyzju pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new ccac349093 [Improvement](cooldown) add statment to show objects which
use storage policy (#701)
ccac349093 is described below
commit ccac349093815da0bdc1cb12ed1bb79ef5c223b5
Author: Yulei-Yang <[email protected]>
AuthorDate: Tue Jun 4 10:55:36 2024 +0800
[Improvement](cooldown) add statment to show objects which use storage
policy (#701)
---
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 74 +++++++++++++++++++++
docs/table-design/cold-hot-separation.md | 2 -
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 74 +++++++++++++++++++++
.../current/table-design/cold-hot-separation.md | 2 -
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 74 +++++++++++++++++++++
.../table-design/cold-hot-separation.md | 2 -
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 75 ++++++++++++++++++++++
.../table-design/cold-hot-separation.md | 2 -
sidebars.json | 1 +
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 74 +++++++++++++++++++++
.../table-design/cold-hot-separation.md | 2 -
.../Show-Statements/SHOW-STORAGE-POLICY-USING.md | 74 +++++++++++++++++++++
.../table-design/cold-hot-separation.md | 2 -
versioned_sidebars/version-2.0-sidebars.json | 1 +
versioned_sidebars/version-2.1-sidebars.json | 1 +
15 files changed, 448 insertions(+), 12 deletions(-)
diff --git
a/docs/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/docs/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..803c94cbc8
--- /dev/null
+++
b/docs/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,74 @@
+---
+{
+ "title": "SHOW-STORAGE-POLICY-USING",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+This command is used to show tables and partitions which is using storage
policy
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. get all objects which are using storage policy
+
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+
+2. get objects which are using the storage policy named test_storage_policy
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git a/docs/table-design/cold-hot-separation.md
b/docs/table-design/cold-hot-separation.md
index 29471dca15..736d2a7061 100644
--- a/docs/table-design/cold-hot-separation.md
+++ b/docs/table-design/cold-hot-separation.md
@@ -211,8 +211,6 @@ Furthermore, the garbage data on objects is not immediately
cleaned up. The BE p
## TODOs
-- Currently, there is no way to query tables associated with a specific
storage policy.
-
- Some remote occupancy metrics may not have comprehensive update retrieval.
## FAQs
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..4ef9d420f3
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,74 @@
+---
+{
+ "title": "SHOW-STORAGE-POLICY-USING",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+查看所有/指定存储策略关联的表和分区
+
+语法:
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. 查看所有启用了存储策略的对象
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+2. 查看使用存储策略test_storage_policy的对象
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/cold-hot-separation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/cold-hot-separation.md
index e79302af92..cd1b28b7de 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/cold-hot-separation.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/table-design/cold-hot-separation.md
@@ -209,8 +209,6 @@ ALTER TABLE create_table_partition MODIFY PARTITION (*)
SET("storage_policy"="te
## 未尽事项
-- 目前暂无方式查询特定 storage policy 关联的表。
-
- 一些远端占用指标更新获取不够完善
## 常见问题
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..2b63451e89
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,74 @@
+---
+{
+"title": "SHOW-STORAGE-POLICY-USING",
+"language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+查看所有/指定存储策略关联的表和分区
+
+语法:
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. 查看所有启用了存储策略的对象
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+2. 查看使用存储策略test_storage_policy的对象
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/table-design/cold-hot-separation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/table-design/cold-hot-separation.md
index 780d2a11fd..c859e10672 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/table-design/cold-hot-separation.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/table-design/cold-hot-separation.md
@@ -209,8 +209,6 @@ ALTER TABLE create_table_partition MODIFY PARTITION (*)
SET("storage_policy"="te
## 未尽事项
-- 目前暂无方式查询特定 storage policy 关联的表。
-
- 一些远端占用指标更新获取不够完善
## 常见问题
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..bc6b562b13
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,75 @@
+---
+{
+ "title": "SHOW-STORAGE-POLICY-USING",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+查看所有/指定存储策略关联的表和分区
+
+语法:
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. 查看所有启用了存储策略的对象
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+
+2. 查看使用存储策略test_storage_policy的对象
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/cold-hot-separation.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/cold-hot-separation.md
index e79302af92..cd1b28b7de 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/cold-hot-separation.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/table-design/cold-hot-separation.md
@@ -209,8 +209,6 @@ ALTER TABLE create_table_partition MODIFY PARTITION (*)
SET("storage_policy"="te
## 未尽事项
-- 目前暂无方式查询特定 storage policy 关联的表。
-
- 一些远端占用指标更新获取不够完善
## 常见问题
diff --git a/sidebars.json b/sidebars.json
index 394ea4ed7c..936f697249 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -1426,6 +1426,7 @@
"sql-manual/sql-statements/Show-Statements/SHOW-TABLE-ID",
"sql-manual/sql-statements/Show-Statements/SHOW-SMALL-FILES",
"sql-manual/sql-statements/Show-Statements/SHOW-POLICY",
+
"sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING",
"sql-manual/sql-statements/Show-Statements/SHOW-CATALOG-RECYCLE-BIN",
"sql-manual/sql-statements/Show-Statements/SHOW-QUERY-STATS"
]
diff --git
a/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..0193851642
--- /dev/null
+++
b/versioned_docs/version-2.0/sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,74 @@
+---
+{
+ "title": "SHOW-STORAGE-POLICY-USING",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+This command is used to show tables and partitions which is using storage
policy
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. get all objects which are using storage policy
+
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+
+2. get objects which are using the storage policy named test_storage_policy
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git a/versioned_docs/version-2.0/table-design/cold-hot-separation.md
b/versioned_docs/version-2.0/table-design/cold-hot-separation.md
index 3b2431385b..0a2b92cf97 100644
--- a/versioned_docs/version-2.0/table-design/cold-hot-separation.md
+++ b/versioned_docs/version-2.0/table-design/cold-hot-separation.md
@@ -211,8 +211,6 @@ Furthermore, the garbage data on objects is not immediately
cleaned up. The BE p
## TODOs
-- Currently, there is no way to query tables associated with a specific
storage policy.
-
- Some remote occupancy metrics may not have comprehensive update retrieval.
## FAQs
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
b/versioned_docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
new file mode 100644
index 0000000000..0193851642
--- /dev/null
+++
b/versioned_docs/version-2.1/sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING.md
@@ -0,0 +1,74 @@
+---
+{
+ "title": "SHOW-STORAGE-POLICY-USING",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## SHOW-STORAGE-POLICY-USING
+
+### Name
+
+SHOW STORAGE POLICY USING
+
+### Description
+
+This command is used to show tables and partitions which is using storage
policy
+
+```sql
+SHOW STORAGE POLICY USING [FOR some_policy]
+```
+
+### Example
+
+1. get all objects which are using storage policy
+
+ ```sql
+ mysql> show storage policy using;
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | PolicyName | Database | Table
| Partitions |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_1 | ALL |
+ | test_storage_policy | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201701 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
partition_with_multiple_storage_policy | p201702 |
+ | test_storage_policy_2 | regression_test_cold_heat_separation_p2 |
table_with_storage_policy_2 | ALL |
+ | test_policy | db2 |
db2_test_1 | ALL |
+
+-----------------------+-----------------------------------------+----------------------------------------+------------+
+ ```
+
+2. get objects which are using the storage policy named test_storage_policy
+
+ ```sql
+ mysql> show storage policy using for test_storage_policy;
+
+---------------------+-----------+---------------------------------+------------+
+ | PolicyName | Database | Table |
Partitions |
+
+---------------------+-----------+---------------------------------+------------+
+ | test_storage_policy | db_1 | partition_with_storage_policy_1 |
p201701 |
+ | test_storage_policy | db_1 | table_with_storage_policy_1 | ALL
|
+
+---------------------+-----------+---------------------------------+------------+
+ ```
+
+### Keywords
+
+ SHOW, STORAGE, POLICY, USING
+
+### Best Practice
diff --git a/versioned_docs/version-2.1/table-design/cold-hot-separation.md
b/versioned_docs/version-2.1/table-design/cold-hot-separation.md
index 29471dca15..736d2a7061 100644
--- a/versioned_docs/version-2.1/table-design/cold-hot-separation.md
+++ b/versioned_docs/version-2.1/table-design/cold-hot-separation.md
@@ -211,8 +211,6 @@ Furthermore, the garbage data on objects is not immediately
cleaned up. The BE p
## TODOs
-- Currently, there is no way to query tables associated with a specific
storage policy.
-
- Some remote occupancy metrics may not have comprehensive update retrieval.
## FAQs
diff --git a/versioned_sidebars/version-2.0-sidebars.json
b/versioned_sidebars/version-2.0-sidebars.json
index c5f509d918..64bce1f140 100644
--- a/versioned_sidebars/version-2.0-sidebars.json
+++ b/versioned_sidebars/version-2.0-sidebars.json
@@ -1342,6 +1342,7 @@
"sql-manual/sql-reference/Show-Statements/SHOW-TABLE-ID",
"sql-manual/sql-reference/Show-Statements/SHOW-SMALL-FILES",
"sql-manual/sql-reference/Show-Statements/SHOW-POLICY",
+
"sql-manual/sql-reference/Show-Statements/SHOW-STORAGE-POLICY-USING",
"sql-manual/sql-reference/Show-Statements/SHOW-CATALOG-RECYCLE-BIN",
"sql-manual/sql-reference/Show-Statements/SHOW-QUERY-STATS"
]
diff --git a/versioned_sidebars/version-2.1-sidebars.json
b/versioned_sidebars/version-2.1-sidebars.json
index b60581f69b..cfaf2cdb67 100644
--- a/versioned_sidebars/version-2.1-sidebars.json
+++ b/versioned_sidebars/version-2.1-sidebars.json
@@ -1420,6 +1420,7 @@
"sql-manual/sql-statements/Show-Statements/SHOW-TABLE-ID",
"sql-manual/sql-statements/Show-Statements/SHOW-SMALL-FILES",
"sql-manual/sql-statements/Show-Statements/SHOW-POLICY",
+
"sql-manual/sql-statements/Show-Statements/SHOW-STORAGE-POLICY-USING",
"sql-manual/sql-statements/Show-Statements/SHOW-CATALOG-RECYCLE-BIN",
"sql-manual/sql-statements/Show-Statements/SHOW-QUERY-STATS"
]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]