From aaed87d0d29536c7e79f0252d4f5c3be8f5cbbd1 Mon Sep 17 00:00:00 2001 From: Nitin Kashyap Date: Sat, 16 Dec 2023 14:47:32 +0530 Subject: [PATCH] [fix](doc) Updated Analyze syntax as per code --- .../Manipulation/ANALYZE.md | 14 +++++++++++- .../Manipulation/ANALYZE.md | 22 ++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md b/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md index 2a02d4b5926141..c77b921e71aa74 100644 --- a/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md +++ b/docs/en/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md @@ -39,13 +39,25 @@ This statement is used to collect statistical information for various columns. ```sql ANALYZE < TABLE | DATABASE table_name | db_name > [ (column_name [, ...]) ] - [ [ WITH SYNC ] [ WITH SAMPLE PERCENT | ROWS ] ]; + [ WITH SYNC ] + [ WITH [ SAMPLE PERCENT | ROWS ] | [FULL] ] + [ WITH INCREMENTAL ] + [ WITH HISTOGRAM ] + [ WITH BUCKETS < bucket count > ] + [ WITH PERIOD < interval in seconds> ] + [ WITH CRON ]; ``` - `table_name`: The specified target table. It can be in the format `db_name.table_name`. - `column_name`: The specified target column. It must be an existing column in `table_name`. You can specify multiple column names separated by commas. - `sync`: Collect statistics synchronously. Returns after collection. If not specified, it executes asynchronously and returns a JOB ID. - `sample percent | rows`: Collect statistics with sampling. You can specify a sampling percentage or a number of sampling rows. +- `full`: Collect statistics with force sampling method full. You can specify either FULL or sample percent/row. +- `incremental`: Collects statistics incrementally or all at once (default: full) +- `histogram`: Collects statistics and build histogram of the specified columns. +- `buckets`: Specifies number of buckets for histogram. +- `period`: Specifies the interval time in which analyze should be scheduled. +- `cron`: Collects statistics periodically based on the cron expression. ### Example diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md index 67fee1d78e2b9f..8644d6522cccd5 100644 --- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md +++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/ANALYZE.md @@ -39,13 +39,25 @@ ANALYZE ```sql ANALYZE < TABLE | DATABASE table_name | db_name > [ (column_name [, ...]) ] - [ [ WITH SYNC ] [ WITH SAMPLE PERCENT | ROWS ] ]; + [ WITH SYNC ] + [ WITH [ SAMPLE PERCENT | ROWS ] | [FULL] ] + [ WITH INCREMENTAL ] + [ WITH HISTOGRAM ] + [ WITH BUCKETS < bucket count > ] + [ WITH PERIOD < interval in seconds> ] + [ WITH CRON ]; ``` -- table_name: 指定的目标表。可以是  `db_name.table_name`  形式。 -- column_name: 指定的目标列。必须是  `table_name`  中存在的列,多个列名称用逗号分隔。 -- sync:同步收集统计信息。收集完后返回。若不指定则异步执行并返回JOB ID。 -- sample percent | rows:抽样收集统计信息。可以指定抽样比例或者抽样行数。 +- `table_name``: 指定的目标表。可以是  `db_name.table_name`  形式。 +- `column_name`: 指定的目标列。必须是  `table_name`  中存在的列,多个列名称用逗号分隔。 +- `sync`:同步收集统计信息。收集完后返回。若不指定则异步执行并返回JOB ID。 +- `sample percent | rows`:抽样收集统计信息。可以指定抽样比例或者抽样行数。 +- `full`:使用完整的强制采样方法收集统计数据。 您可以指定 FULL 或样本百分比/行。 +- `incremental`:增量或一次性收集统计信息(默认:完整) +- `histogram`:收集统计信息并构建指定列的直方图。 +- `buckets`:指定直方图的桶数。 +- `period`:指定应安排分析的间隔时间。 +- `cron`:根据 cron 表达式定期收集统计信息。 ### Example