morrySnow commented on code in PR #1964: URL: https://github.com/apache/doris-website/pull/1964#discussion_r1944582864
########## docs/sql-manual/sql-statements/statistics/ANALYZE.md: ########## @@ -27,33 +27,66 @@ under the License. ## Description -This statement is used to collect statistical information for various columns. +This statement is used to collect column statistics. Statistics of columns can be collected for a table (specific columns can be specified) or for the entire database. + +## Syntax ```sql -ANALYZE < TABLE | DATABASE table_name | db_name > - [ (column_name [, ...]) ] - [ [ WITH SYNC ] [ WITH SAMPLE PERCENT | ROWS ] ]; +ANALYZE {TABLE <table_name> [ (<column_name> [, <column_name>...]) ] | DATABASE <database_name> } Review Comment: ```suggestion ANALYZE {TABLE <table_name> [ (<column_name> [, ...]) ] | DATABASE <database_name> } ``` ########## docs/sql-manual/sql-statements/statistics/SHOW-ANALYZE.md: ########## @@ -24,82 +24,95 @@ specific language governing permissions and limitations under the License. --> - - ## Description -Use `SHOW ANALYZE` to view information about statistics collection jobs. +This statement is used to view the status of the statistics collection job. -Syntax: +## Syntax ```SQL -SHOW [AUTO] ANALYZE < table_name | job_id > - [ WHERE [ STATE = [ "PENDING" | "RUNNING" | "FINISHED" | "FAILED" ] ] ]; +SHOW [AUTO] ANALYZE [ < table_name > | < job_id > ] + [ WHERE STATE = { "PENDING" | "RUNNING" | "FINISHED" | "FAILED" } ]; ``` -- AUTO: Show historical information for automatic collection jobs only. Note that, by default, the status of only the last 20,000 completed automatic collection jobs is retained. -- table_name: Table name, specify to view statistics job information for that table. It can be in the format `db_name.table_name`. When not specified, it returns information for all statistics jobs. -- job_id: Job ID for statistics collection, obtained when executing `ANALYZE`. When not specified, this command returns information for all statistics jobs. +## Required Parameters -Output: +**None** -| Column Name | Description | -| :--------------------- | :--------------- | -| `job_id` | Job ID | -| `catalog_name` | Catalog Name | -| `db_name` | Database Name | -| `tbl_name` | Table Name | -| `col_name` | Column Name List | -| `job_type` | Job Type | -| `analysis_type` | Analysis Type | -| `message` | Job Information | -| `last_exec_time_in_ms` | Last Execution Time | -| `state` | Job Status | -| `schedule_type` | Scheduling Method | +## Optional Parameters Review Comment: 缺少 state 参数的说明 ``` [ WHERE STATE = { "PENDING" | "RUNNING" | "FINISHED" | "FAILED" } ] ``` ########## docs/sql-manual/sql-statements/statistics/SHOW-ANALYZE.md: ########## @@ -24,82 +24,95 @@ specific language governing permissions and limitations under the License. --> - - ## Description -Use `SHOW ANALYZE` to view information about statistics collection jobs. +This statement is used to view the status of the statistics collection job. -Syntax: +## Syntax ```SQL -SHOW [AUTO] ANALYZE < table_name | job_id > - [ WHERE [ STATE = [ "PENDING" | "RUNNING" | "FINISHED" | "FAILED" ] ] ]; +SHOW [AUTO] ANALYZE [ < table_name > | < job_id > ] Review Comment: ```suggestion SHOW [AUTO] ANALYZE [ <table_name> | <job_id> ] ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org