CLEAN ALL QUERY STATS
Descriptionβ
This statement is used to clear query statistics
Syntaxβ
CLEAN [ { ALL| DATABASE | TABLE } ] QUERY STATS [ { [ FOR <db_name>] | [ { FROM | IN } ] <table_name>]];
Required Parametersβ
1. ALL
Use ALL to clear all query statistics
2. DATABASE
Use DATABASE to clear database query statistics
3. TABLE
Use TABLE to clear table query statistics
Optional Parametersβ
1. <db_name>
If this parameter is set, the statistics of the corresponding database are cleared
2. <table_name>
If this parameter is set, the statistics of the corresponding table are cleared
Access Control Requirementsβ
The user who executes this SQL command must have at least the following permissions:
Privilege | Object | Notes |
---|---|---|
ADMIN_PRIV | ALL | If ALL is specified, the ADMIN permission is required |
ALTER_PRIV | DATABASE | If the database is specified, the ALTER permission for the corresponding database is required |
ADMIN_PRIV | TABLE | If you specify a table, you need alter permission for that table |
Examplesβ
clean all query stats
clean database query stats for test_query_db
clean table query stats from test_query_db.baseall