Skip to main content
VeloDB Cloud 26.x is based on Apache Doris 4.x. See Version Mapping.

ADMIN CLEAN TRASH

Note:

This low-level statement belongs to engine diagnosis or repair. Replica placement, host disks, and warehouse storage are managed by VeloDB Cloud. Contact VeloDB Cloud support before performing repair or metadata changes. The reference syntax does not replace the managed cluster lifecycle.

Description​

This statement is used to clear garbage data in backend.

Syntax​

ADMIN CLEAN TRASH [ON ("<be_host>:<be_heartbeat_port>" [, ...])]

Optional parameters​

1. [ON ("<be_host>:<be_heartbeat_port>" [, ...])]

Specify the backend to be cleaned up. If you do not add ON, all backend is cleared by default.

Access control requirements​

Users executing this SQL command must have at least the following privileges:

PrivilegeObjectNotes
ADMIN_PRIVUser or RoleOnly users or roles with the ADMIN_PRIV privilege can perform the CLEAN TRASH operation.

Examples​

-- Clean up the junk data of all be nodes.
ADMIN CLEAN TRASH;
-- Clean up garbage data for '192.168.0.1:9050' and '192.168.0.2:9050'.
ADMIN CLEAN TRASH ON ("192.168.0.1:9050", "192.168.0.2:9050");