• greenplum 5.7 + gp_toolkit


    gp_toolkit 是 greenplum的一个功能schema。包含了大量实用的函数。

    [gpadmin@node1 gpseg-1]$ psql -d peiybdb
    psql (8.3.23)
    Type "help" for help.
    
    peiybdb=# dnS+
                                                     List of schemas
            Name        |  Owner  | Access privileges  |                         Description                         
    --------------------+---------+--------------------+-------------------------------------------------------------
     gp_toolkit         | gpadmin | gpadmin=UC/gpadmin | 
                                  : =U/gpadmin           
     information_schema | gpadmin | gpadmin=UC/gpadmin | 
                                  : =U/gpadmin           
     pg_aoseg           | gpadmin |                    | Reserved schema for Append Only segment list and eof tables
     pg_bitmapindex     | gpadmin |                    | Reserved schema for internal relations of bitmap indexes
     pg_catalog         | gpadmin | gpadmin=UC/gpadmin | system catalog schema
                                  : =U/gpadmin           
     pg_toast           | gpadmin |                    | reserved schema for TOAST tables
     public             | gpadmin | gpadmin=UC/gpadmin | standard public schema
                                  : =UC/gpadmin          
    (7 rows)
    

    gp_toolkit.gp_log_system

    所有日志,实际上是一个外部表,列出了所有segment, master的csvlog的内容

    peiybdb=# select * from gp_toolkit.gp_log_system;

    gp_toolkit.gp_log_database

    当前数据库日志

    peiybdb=# select * from gp_toolkit.gp_log_database;

    gp_toolkit.gp_disk_free

    segment节点的磁盘情况

    peiybdb=# select * from gp_toolkit.gp_disk_free;
     dfsegment | dfhostname |         dfdevice         | dfspace  
    -----------+------------+--------------------------+----------
             0 |  node2     |  /dev/mapper/centos-root | 10183304
             1 |  node3     |  /dev/mapper/centos-root | 10183736
    (2 rows)
    

    gp_toolkit.gp_stats_missing

    未收集统计信息的表

    peiybdb=# select * from gp_toolkit.gp_stats_missing;
     smischema | smitable | smisize | smicols | smirecs 
    -----------+----------+---------+---------+---------
    (0 rows)
    

    gp_toolkit.gp_bloat_diag

    找出膨胀较厉害的表

    peiybdb=# select * from gp_toolkit.gp_bloat_diag;
     bdirelid | bdinspname | bdirelname | bdirelpages | bdiexppages |              bdidiag               
    ----------+------------+------------+-------------+-------------+------------------------------------
         2618 | pg_catalog | pg_rewrite |          19 |           5 | moderate amount of bloat suspected
    (1 row)
    

    gp_toolkit.gp_bloat_expected_pages

    找出所有对象的膨胀明细

    peiybdb=# select * from gp_toolkit.gp_bloat_expected_pages;
     btdrelid | btdrelpages | btdexppages 
    ----------+-------------+-------------
         2620 |           1 |           2
         1260 |           1 |           2
         1255 |          20 |          17
        11840 |           1 |           2
    

    参考:
    https://greenplum.org/docs/570/common/gpdb-features.html
    https://gpdb.docs.pivotal.io/570/main/index.html

  • 相关阅读:
    差分约束
    关系运算图。。。(差分约束)
    克鲁斯卡尔算法+并查集
    整体代换(数学)
    魔性の分块 | | jzoj1243 | | 线段树の暴力
    论人品 | | noip1015模拟考
    hash 表 | | jzoj 1335 | | 脑残+手残 | | 集合的关系
    凸轮大总结
    Floyd | | jzoj[1218] | | [Usaco2009 Dec]Toll 过路费 | | BZOJ 1774 | | 我也不知道该怎么写
    topsort | | jzoj[1226] | | NOIP2003神经网络
  • 原文地址:https://www.cnblogs.com/ctypyb2002/p/9792993.html
Copyright © 2020-2023  润新知