> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# KILL ANALYZE

> KILL ANALYZE cancels a running collection task, including manual and custom automatic tasks.

KILL ANALYZE cancels a **running** collection task, including manual and custom automatic tasks.

This statement is supported from v2.4.

## Syntax

```SQL theme={null}
KILL ANALYZE <ID>
```

The task ID for a manual collection task can be obtained from SHOW ANALYZE STATUS. The task ID for a custom collection task can be obtained from SHOW ANALYZE SHOW ANALYZE JOB.

## References

[SHOW ANALYZE STATUS](/documents/4.2/sql-reference/sql-statements/cbo_stats/SHOW_ANALYZE_STATUS.md)

[SHOW ANALYZE JOB](/documents/4.2/sql-reference/sql-statements/cbo_stats/SHOW_ANALYZE_JOB.md)

For more information about collecting statistics for CBO, see [Gather statistics for CBO](/documents/4.2/using_starrocks/Cost_based_optimizer.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.