Skip to content

Commit 5a05860

Browse files
committed
Update 00-cluster-key.md
1 parent 49fe0aa commit 5a05860

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/en/guides/55-performance/00-cluster-key.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ If you re-cluster the example table in the [How Cluster Key Works](#how-cluster-
150150
This is the most ideal scenario. In most cases, achieving this situation might require running a re-cluster operation more than once. Re-clustering a table consumes time (even longer if you include the **FINAL** option) and credits (when you are in Databend Cloud). Databend recommends using the function [CLUSTERING_INFORMATION](/sql/sql-functions/system-functions/clustering_information) to determine when to re-cluster a table:
151151

152152
```sql
153-
SELECT If(average_depth > total_block_count * 0.001
154-
AND average_depth > 1, 'The table needs re-cluster now',
153+
SELECT IF(average_depth > 2 * LEAST(GREATEST(total_block_count * 0.001, 1), 16),
154+
'The table needs re-cluster now',
155155
'The table does not need re-cluster now')
156-
FROM CLUSTERING_INFORMATION('<your_database>', '<your_table>');
156+
FROM clustering_information('<your_database>', '<your_table>');
157157
```
158158

159159
## Managing Cluster Key

0 commit comments

Comments
 (0)