This command is used to delete segments by the ID.
DELETE FROM TABLE db_name.table_name WHERE SEGMENT.ID IN (segment_id1,segment_id2);
Parameter |
Description |
---|---|
segment_id |
ID of the segment to be deleted. |
db_name |
Database name. If the parameter is not specified, the current database is used. |
table_name |
The name of the table in a specific database. |
Segments cannot be deleted from the stream table.
DELETE FROM TABLE CarbonDatabase.CarbonTable WHERE SEGMENT.ID IN (0);
DELETE FROM TABLE CarbonDatabase.CarbonTable WHERE SEGMENT.ID IN (0,5,8);
Success or failure will be recorded in the CarbonData log.