The ALTER TABLE statement is used to alter a defined table.
COMPACT
Available since: v3.0.0
Performs storage compaction on a specific table keyspace. To compact other resources, use ALTER SYSTEM to compact the entire datastore, ALTER NAMESPACE to compact the current namespace keyspace, or ALTER DATABASE to compact the current database keyspace.
The actual compaction used will depend on the datastore, such as RocksDB or SurrealKV.
This clause will not work with in-memory storage which has nothing persistent to compact, producing the following error:
A successful compaction will return NONE.