- 启动/关闭
gpstart
gpstop -M fast
gpstop -m
gpstop --host sdw1 # 只关一个节点
- 查看状态
gpstate -b # brief status
gpstate -c # show primary to mirror mappings
gpstate -e # show segments with mirror status issues
gpstate -f # show standby master details
gpstate -i # show Greenplum Database version
gpstate -m # list mirrors
gpstate -p # show ports
gpstate -Q # quick status
gpstate -s # detailed status
- ANALYZE
analyzedb
-d database
-s schema
-t schema.table
-i col1,col2,col3
-x col11,col12,col13
--skip_root_stats This option is no longer used. Please remove it from
your scripts.
--gen_profile_only Create cached state files to indicate specified table
or all tables have been analyzed.
--full Analyze without using incremental. All tables
requested by the user will be analyzed.
--clean_last Clean the state files generated by last analyzedb run.
All other options except -d will be ignored.
--clean_all Clean all the state files generated by analyzedb. All
other options except -d will be ignored.
When to Run ANALYZE
Run ANALYZE:
after loading data,
after CREATE INDEX operations,
and after INSERT, UPDATE, and DELETE operations that significantly change the underlying data.
- 检查 catalog
gpcheckcat -U gpadmin -A -p 5432
- 节点性能
# 查看所有节点的磁盘性能及内存性能
gpcheckperf -f /usr/local/greenplum-dball_segments -d /data/greenplum/data1 -d /data/greenplum/data2 -r ds
# 节点之间磁盘性能
gpcheckperf -h sdw1 -h sdw2 -d /data1 -r d -D -v
# 查看节点之间网络状况
gpcheckperf -f /usr/local/greenplum-dball_segments -r N -d /tmp