Skip to main content

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:

PrivilegeObjectNotes
ADMIN_PRIVALLIf ALL is specified, the ADMIN permission is required
ALTER_PRIVDATABASEIf the database is specified, the ALTER permission for the corresponding database is required
ADMIN_PRIVTABLEIf 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