ADMIN
ADMIN
is used to run administration functions.
ADMIN function(arg1, arg2, ...)
Admin Functions
GreptimeDB provides some administration functions to manage the database and data:
flush_table(table_name)
to flush a table’s memtables into SST file by table name.flush_region(region_id)
to flush a region’s memtables into SST file by region id. Find the region id through PARTITIONS table.compact_table(table_name, [type], [options])
to schedule a compaction task for a table by table name, read compaction for more details.compact_region(region_id)
to schedule a compaction task for a region by region id.migrate_region(region_id, from_peer, to_peer, [timeout])
to migrate regions between datanodes, please read the Region Migration.procedure_state(procedure_id)
to query a procedure state by its id.flush_flow(flow_name)
to flush a flow’s output into the sink table.
For example:
-- Flush the table test --
admin flush_table("test");
-- Schedule a compaction for table test --
admin compact_table("test");
当前内容版权归 GreptimeDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 GreptimeDB .