管理

本文件介绍了在 GreptimeDB 系统运维和部署中使用的策略和实践。

数据库/集群管理

运行时信息

例如查询一张表的所有 Region Id:

  1. SELECT greptime_partition_id FROM PARTITIONS WHERE table_name = 'monitor'

查询一张表的 region 分布在哪些 datanode 上:

  1. SELECT b.peer_id as datanode_id,
  2. a.greptime_partition_id as region_id
  3. FROM information_schema.partitions a LEFT JOIN information_schema.region_peers b
  4. ON a.greptime_partition_id = b.region_id
  5. WHERE a.table_name='monitor'
  6. ORDER BY datanode_id ASC

INFORMATION_SCHEMA 数据库提供了对系统元数据的访问,如数据库或表的名称、列的数据类型等。请阅读 参考文档

数据管理

最佳实践