CLEAN-QUERY-STATS

Name

CLEAN QUERY STATS

Description

This statement is used to clear query statistics

grammar:

  1. CLEAN [ALL| DATABASE | TABLE] QUERY STATS [[FOR db_name]|[FROM|IN] table_name]];

Remarks:

  1. If ALL is specified, all query statistics are cleared, including database and table, admin privilege is needed
  2. If DATABASE is specified, the query statistics of the specified database are cleared, alter privilege for this database is needed
  3. If TABLE is specified, the query statistics of the specified table are cleared, alter privilege for this table is needed

Example

  1. Clear all statistics

    1. clean all query stats;
  2. Clear the specified database statistics

    1. clean database query stats for test_query_db;
  3. Clear the specified table statistics

    1. clean table query stats from test_query_db.baseall;

Keywords

  1. CLEAN, QUERY, STATS

Best Practice