首页 > 其他分享 >详解GaussDB(DWS)中3个防过载检查项

详解GaussDB(DWS)中3个防过载检查项

时间:2024-03-18 14:25:40浏览次数:26  
标签:DWS -- tablename GaussDB WHEN 个防 t1 pg schemaname

本文分享自华为云社区《【防过载检查项】》,作者: 譡里个檔。

1. GUC参数检查

目的:针对不同版本建议设定不同的参数值,当前先检查出来,后续diagnosis会给出建议值

SELECT
    split_part((substring(version() from '\((.*)\)')), ' ', 2) AS version,
    (EXISTS (SELECT 1 FROM (SELECT count(DISTINCT node_name) AS dn_cnt 
      FROM pgxc_node WHERE node_type = 'D' AND node_host <> 'localhost' GROUP BY node_host) WHERE dn_cnt <> 1)
    ) AS sdn_per_node,
    node_name, name AS guc_name,
    CASE WHEN unit = 'ms' THEN setting::bigint/1000 || ' s'
         WHEN unit = 's' THEN setting || ' s'
         WHEN unit = 'KB' THEN pg_size_pretty(setting*1024)
         WHEN unit = '8KB' THEN pg_size_pretty(setting*1024*8)
         ELSE setting
    END AS setting, unit,
    CASE WHEN name = 'default_distribution_mode' THEN
             CASE WHEN setting <> 'roundrobin' THEN 'roundrobin' END
         WHEN name = 'autovacuum' THEN
             CASE WHEN setting <> 'on' THEN 'on' END
         WHEN name = 'autovacuum_max_workers' THEN
             CASE WHEN setting::int > 6 THEN '6' END
         WHEN name = 'autovacuum_max_workers' THEN
             CASE WHEN setting::int > 3 THEN '3' END
         WHEN name = 'session_timeout' THEN
             CASE WHEN setting::int > 600 OR setting::int = 0 THEN '<= 10min' END
         WHEN name = 'statement_timeout' THEN
             CASE WHEN setting::int > 24* 60 * 1000 OR setting::int = 0 THEN '<= 24h' END
         WHEN name = 'sql_use_spacelimit' THEN
             CASE WHEN setting::int > 300*1024*1024 OR setting IN ('0', '-1') THEN '<= 300GB' END
         WHEN name = 'temp_file_limit' THEN
             CASE WHEN setting::int > 100*1024*1024 OR setting IN ('0', '-1') THEN '<= 100GB' END
         WHEN name = 'udf_memory_limit' THEN
             CASE WHEN setting::int > 1*1024*1024  THEN '<= 1GB' END
         WHEN name = 'query_dop' THEN
             CASE WHEN setting::int = 0 THEN ' -4' END
         WHEN name = 'max_streams_per_query' THEN
             CASE WHEN setting::int = -1 THEN '50' END
         WHEN name = 'max_connections' THEN
             CASE WHEN node_name = 'dn_6001_6002' AND setting::int < 5000 THEN '>=5000' END
         ELSE ''
    END AS diagnosis
FROM pgxc_parallel_query('all', 'SELECT
    pgxc_node_str() AS node_name, name, setting, unit
FROM pg_settings 
WHERE pgxc_node_str() IN (''cn_5001'',''dn_6001_6002'')
AND name in (''max_streams_per_query'',''query_dop''
,''sql_use_spacelimit'',''temp_file_limit'',''default_distribution_mode'',
''autovacuum_mode'',''autovacuum'',''autovacuum_max_workers_hstore'',''autovacuum_max_workers'',
''session_timeout'',''statement_timeout'',''ddl_lock_timeout'',''idle_in_transaction_timeout'',
''max_connections'',''min_pool_size'',''max_pool_size'',
''max_stream_pool'',''max_active_statements'',''max_prepared_transactions'',
''cstore_buffers'',''shared_buffers'', ''max_process_memory'', ''udf_memory_limit'',
''max_process_memory_balanced'', ''bbox_dump_count'', ''enable_bbox_dump'')') 
AS (node_name name, name text, setting text, unit text)
ORDER BY node_name, name;

2. 大表检查

目的:识别大表,建议客户整改,避免磁盘过载

8.1.3版本使用如下SQL

SELECT
    CASE WHEN (skewsize > avgsize * 0.10 AND skewsize > 50 * 1024) THEN 'skew table'
        WHEN (reloptions::text LIKE '%orientation=column%' AND reloptions::text LIKE '%compression=no%') THEN 'uncompressed column table'
        WHEN (x.pclocatortype = 'R' AND avgsize > 10 * 1024) THEN 'large replicattion table'
        WHEN (pg_stat_get_dead_tuples(c.oid) >100000 AND pg_stat_get_dead_tuples(c.oid)/(pg_stat_get_dead_tuples(c.oid)+pg_stat_get_live_tuples(c.oid)) > 0.4) THEN 'dirty table'
        ELSE 'normal large table'
    END AS diagnostic,
    t1.schemaname,  -- 表的schema
    t1.tablename,   -- 表名
    a.rolname AS tableowner,
    x.pgroup AS nodegroup,
    CASE x.pclocatortype WHEN 'H' THEN 'Hash' 
        WHEN 'N' THEN 'Round Robin' 
        WHEN 'R' THEN 'Replicate' 
    END AS locatortype,
    CASE WHEN c.parttype = 'p' THEN true ELSE false END AS ispartitioned,
    CASE WHEN reloptions::text LIKE '%orientation=column%' THEN 'column'
         WHEN reloptions::text LIKE '%orientation=row%' THEN 'row'
    END AS orientation,
    t1.dnnum,                         -- 表的node group的DN数
    t1.totalsize AS "totalsize(MB)",  -- 表的size ,单位MB
    t1.avgsize AS "avgsize(MB)",      -- 平均每个DN上数据量,单位MB
    t1.skewsize AS "skewsize(MB)",    -- 不同DN上数据size的最大差值,单位MB
    t1.skewdn,                        -- 数据量最大的DN
    t1.maxratio,                      -- 数据量最大DN的size/平均size
    t1.minratio,                      -- 数据量最小DN的size/平均size
    t1.skewratio                      -- 不同DN上数据size的最大差值/平均size
FROM ( -- 预处理,识别倾斜表
    SELECT
        schemaname,
        tablename,
        skewdn,
        dnnum,
        totalsize,
        avgsize,
        skewsize,
        (maxsize/avgsize)::numeric(20,2) AS maxratio,
        (minsize/avgsize)::numeric(20,2) AS minratio,
        (skewsize/avgsize)::numeric(20,2) AS skewratio
    FROM (
        SELECT
            schemaname,tablename,skewdn,count(1) AS dnnum,sum(dnsize) AS totalsize,
            avg(dnsize) AS avgsize,max(dnsize) AS maxsize,min(dnsize) AS minsize, (max(dnsize) - min(dnsize)) AS skewsize
        FROM ( --对每个表的数据按照DN数据量大小排序,以及获取倾斜的dn
            SELECT     
                schemaname,
                tablename,
                nodename,
                (dnsize/1024/1024)::bigint AS dnsize, -- 单位换算为MB
                first_value(nodename) over (PARTITION BY schemaname, tablename ORDER BY dnsize DESC, nodename) AS skewdn  -- --数据量最大的DN
            FROM ( -- 获取大于10GB的表
                SELECT 
                    schemaname, tablename,(rd).nodename, ((rd).dnsize + 1) AS dnsize
                FROM (
                    SELECT
                        schemaname, tablename, gs_table_distribution(schemaname, tablename) AS rd
                    FROM gs_table_distribution()
                    WHERE schemaname NOT IN ('pg_catalog', 'dbms_om', 'cstore')
                    AND relkind = 'r'
                    GROUP BY schemaname, tablename
                    HAVING sum(dnsize) > 50.0 * 1024 * 1024 * 1024 -- 总大小大于100GB
                )
            )
        )
        GROUP BY schemaname,tablename, skewdn
    )
) t1
INNER JOIN pg_class c ON c.relname = t1.tablename
LEFT JOIN pg_namespace n ON n.nspname = t1.schemaname
LEFT JOIN pg_authid a ON a.oid = c.relowner
LEFT JOIN pgxc_class x ON x.pcrelid = c.oid
WHERE c.reloptions::text NOT LIKE '%internal_mask%'
ORDER BY totalsize DESC, diagnostic, skewsize DESC
;

8.2.1和8.2.0版本使用如下

-- 大表诊断
SELECT
    CASE WHEN (skewsize > avgsize * 0.10 AND skewsize > 50 * 1024) THEN 'skew table'
        WHEN (reloptions::text LIKE '%orientation=column%' AND reloptions::text LIKE '%compression=no%') THEN 'uncompressed column table'
        WHEN (x.pclocatortype = 'R' AND avgsize > 10 * 1024) THEN 'large replicattion table'
        WHEN (pg_stat_get_dead_tuples(c.oid) >100000 AND pg_stat_get_dead_tuples(c.oid)/(pg_stat_get_dead_tuples(c.oid)+pg_stat_get_live_tuples(c.oid)) > 0.4) THEN 'dirty table'
        WHEN (reloptions::text LIKE '%orientation=column%') THEN
            CASE WHEN (SELECT total_cu_count > 0 AND (zero_size_cu_count + small_cu_count)/total_cu_count > 0.5 FROM get_col_cu_info(t1.schemaname, t1.tablename)) THEN 'small cu table'
                ELSE 'normal large table'
            END
        ELSE 'normal large table'
    END AS diagnostic,
    t1.schemaname,  -- 表的schema
    t1.tablename,   -- 表名
    a.rolname AS tableowner,
    x.pgroup AS nodegroup,
    CASE x.pclocatortype WHEN 'H' THEN 'Hash' 
        WHEN 'N' THEN 'Round Robin' 
        WHEN 'R' THEN 'Replicate' 
    END AS locatortype,
    CASE WHEN c.parttype = 'p' THEN true ELSE false END AS ispartitioned,
    CASE WHEN reloptions::text LIKE '%orientation=column%' THEN 'column'
         WHEN reloptions::text LIKE '%orientation=row%' THEN 'row'
    END AS orientation,
    t1.dnnum,                         -- 表的node group的DN数
    t1.totalsize AS "totalsize(MB)",  -- 表的size ,单位MB
    t1.avgsize AS "avgsize(MB)",      -- 平均每个DN上数据量,单位MB
    t1.skewsize AS "skewsize(MB)",    -- 不同DN上数据size的最大差值,单位MB
    t1.skewdn,                        -- 数据量最大的DN
    t1.maxratio,                      -- 数据量最大DN的size/平均size
    t1.minratio,                      -- 数据量最小DN的size/平均size
    t1.skewratio                      -- 不同DN上数据size的最大差值/平均size
FROM ( -- 预处理,识别倾斜表
    SELECT
        schemaname,
        tablename,
        skewdn,
        dnnum,
        totalsize,
        avgsize,
        skewsize,
        (maxsize/avgsize)::numeric(20,2) AS maxratio,
        (minsize/avgsize)::numeric(20,2) AS minratio,
        (skewsize/avgsize)::numeric(20,2) AS skewratio
    FROM (
        SELECT
            schemaname,
            tablename,
            skewdn,
            count(1) AS dnnum,
            sum(dnsize) AS totalsize,
            avg(dnsize) AS avgsize,
            max(dnsize) AS maxsize,
            min(dnsize) AS minsize,
            (max(dnsize) - min(dnsize)) AS skewsize
        FROM ( --对每个表的数据按照DN数据量大小排序,以及获取倾斜的dn
            SELECT     
                schemaname,
                tablename,
                nodename,
                (dnsize/1024/1024)::bigint AS dnsize, -- 单位换算为MB
                first_value(nodename) over (PARTITION BY schemaname, tablename ORDER BY dnsize DESC, nodename) AS skewdn  -- --数据量最大的DN
            FROM ( -- 获取大于10GB的表
                SELECT 
                    schemaname, tablename,(rd).nodename, ((rd).dnsize + 1) AS dnsize
                FROM (
                    SELECT
                        schemaname, tablename, gs_table_distribution(schemaname, tablename) AS rd
                    FROM gs_table_distribution()
                    WHERE schemaname NOT IN ('pg_catalog', 'dbms_om', 'cstore')
                    AND relkind = 'r'
                    GROUP BY schemaname, tablename
                    HAVING sum(dnsize) > 50* 1024 * 1024 * 1024.0 -- 总大小大于100GB
                )
            )
        )
        GROUP BY schemaname,tablename, skewdn
    )
) t1
INNER JOIN pg_class c ON c.relname = t1.tablename
LEFT JOIN pg_namespace n ON n.nspname = t1.schemaname
LEFT JOIN pg_authid a ON a.oid = c.relowner
LEFT JOIN pgxc_class x ON x.pcrelid = c.oid
WHERE c.reloptions::text NOT LIKE '%internal_mask%'
ORDER BY totalsize DESC, diagnostic, skewsize DESC
;

8.3.0版本使用

-- 大表诊断
SELECT
    CASE WHEN (skewsize > avgsize * 0.10 AND skewsize > 50 * 1024) THEN 'skew table'
        WHEN (reloptions::text LIKE '%orientation=column%' AND reloptions::text LIKE '%compression=no%') THEN 'uncompressed column table'
        WHEN (x.pclocatortype = 'R' AND avgsize > 10 * 1024) THEN 'large replicattion table'
        WHEN (pg_stat_get_dead_tuples(c.oid) >100000 AND pg_stat_get_dead_tuples(c.oid)/(pg_stat_get_dead_tuples(c.oid)+pg_stat_get_live_tuples(c.oid)) > 0.4) THEN 'dirty table'
        WHEN (reloptions::text LIKE '%orientation=column%') THEN
            CASE WHEN (SELECT total_cu_count > 0 AND (zero_cu_count + small_cu_count)/total_cu_count > 0.5 FROM pgxc_get_small_cu_info(c.oid)) THEN 'small cu table'
                ELSE 'normal large table'
            END
        ELSE 'normal large table'
    END AS diagnostic,
    t1.schemaname,  -- 表的schema
    t1.tablename,   -- 表名
    a.rolname AS tableowner,
    x.pgroup AS nodegroup,
    CASE x.pclocatortype WHEN 'H' THEN 'Hash' 
        WHEN 'N' THEN 'Round Robin' 
        WHEN 'R' THEN 'Replicate' 
    END AS locatortype,
    CASE WHEN c.parttype = 'p' THEN true ELSE false END AS ispartitioned,
    CASE WHEN reloptions::text LIKE '%orientation=column%' THEN 'column'
         WHEN reloptions::text LIKE '%orientation=row%' THEN 'row'
    END AS orientation,
    t1.dnnum,                         -- 表的node group的DN数
    t1.totalsize AS "totalsize(MB)",  -- 表的size ,单位MB
    t1.avgsize AS "avgsize(MB)",      -- 平均每个DN上数据量,单位MB
    t1.skewsize AS "skewsize(MB)",    -- 不同DN上数据size的最大差值,单位MB
    t1.skewdn,                        -- 数据量最大的DN
    t1.maxratio,                      -- 数据量最大DN的size/平均size
    t1.minratio,                      -- 数据量最小DN的size/平均size
    t1.skewratio                      -- 不同DN上数据size的最大差值/平均size
FROM ( -- 预处理,识别倾斜表
    SELECT
        schemaname,
        tablename,
        skewdn,
        dnnum,
        totalsize,
        avgsize,
        skewsize,
        (maxsize/avgsize)::numeric(20,2) AS maxratio,
        (minsize/avgsize)::numeric(20,2) AS minratio,
        (skewsize/avgsize)::numeric(20,2) AS skewratio
    FROM (
        SELECT
            schemaname,
            tablename,
            skewdn,
            count(1) AS dnnum,
            sum(dnsize) AS totalsize,
            avg(dnsize) AS avgsize,
            max(dnsize) AS maxsize,
            min(dnsize) AS minsize,
            (max(dnsize) - min(dnsize)) AS skewsize
        FROM ( --对每个表的数据按照DN数据量大小排序,以及获取倾斜的dn
            SELECT     
                schemaname,
                tablename,
                nodename,
                (dnsize/1024/1024)::bigint AS dnsize, -- 单位换算为MB
                first_value(nodename) over (PARTITION BY schemaname, tablename ORDER BY dnsize DESC, nodename) AS skewdn  -- --数据量最大的DN
            FROM ( -- 获取大于10GB的表
                SELECT 
                    schemaname, tablename,(rd).nodename, ((rd).dnsize + 1) AS dnsize
                FROM (
                    SELECT
                        schemaname, tablename, gs_table_distribution(schemaname, tablename) AS rd
                    FROM gs_table_distribution()
                    WHERE schemaname NOT IN ('pg_catalog', 'dbms_om', 'cstore')
                    AND relkind = 'r'
                    GROUP BY schemaname, tablename
                    HAVING sum(dnsize) > 50.0 * 1024 * 1024 * 1024 -- 总大小大于100GB
                )
            )
        )
        GROUP BY schemaname,tablename, skewdn
    )
) t1
INNER JOIN pg_class c ON c.relname = t1.tablename
LEFT JOIN pg_namespace n ON n.nspname = t1.schemaname
LEFT JOIN pg_authid a ON a.oid = c.relowner
LEFT JOIN pgxc_class x ON x.pcrelid = c.oid
WHERE c.reloptions::text NOT LIKE '%internal_mask%'
ORDER BY totalsize DESC, diagnostic, skewsize DESC
;

针对不同的诊断结果使用如下诊断措施

类别

建议手段

skew table

根据业务选择关联常用,并且数据不倾斜的列作为修改分布列,如果找不到合适的分布列,可以把表修改为RoundRobin分布

ALTER TABLE ctmes_tgmesmbi.mbi_hlottsthisDISTRIBUTE BY ROUNDROBIN;复制
  • 注意:修改分布列的过程中此表存在双份数据,因此要预留足够的磁盘空间,防止导致磁盘空间过载。
  • ALTER TABLE修改分布列对表持8级锁,阻塞此表的SELECT、UPDATE、DELETE、INSERT等操作

uncompressed column table

列存表的压缩效果非常好,一般推荐使用压缩,至少使用low级别压缩

ALTER TABLE customer_address SET(compression=low);
VACUUM FULL customer_address;复制
  • 注意,VACUUM FULL的过程中此表存在双份数据,因此要预留足够的磁盘空间,防止VACUUM FULL过程中导致磁盘空间过载。
  • VACUUM FULL对表持8级锁,阻塞此表的SELECT、UPDATE、DELETE、INSERT等操作

dirty table

说明表检测碎片率比较高,需要通过VACUUM整理表

VACUUM FULL customer_address;复制
  • VACUUM FULL的过程中此表存在双份数据,因此要预留足够的磁盘空间,防止VACUUM FULL过程中导致磁盘空间过载。
  • VACUUM FULL对表持8级锁,阻塞此表的SELECT、UPDATE、DELETE、INSERT等操作

small cu table

说明表小CU比较多,需要通过VACUUM整理表

VACUUM FULL customer_address;复制
  • VACUUM FULL的过程中此表存在双份数据,因此要预留足够的磁盘空间,防止VACUUM FULL过程中导致磁盘空间过载。
  • VACUUM FULL对表持8级锁,阻塞此表的SELECT、UPDATE、DELETE、INSERT等操作

large replicattion table

复制表在每个DN上都有一份全量数据,当表磁盘空间占用过大时,需要把表修改为HASH表。一般复制表都是维表,存在主键,直接把分布列修改为主键

ALTER TABLE ctmes_tgmesmbi.mbi_hlottsthisDISTRIBUTE BY HASH(id);复制

normal large table

 

3. 冗余索引诊断

目的:识别冗余索引,建议客户删除。可以降低磁盘空间,并降低大规模数据导入的时候的xlog规模

-- optimizable policy为duplicate的检查项
--        表明两个索引字段和字段顺序完全一致
--         建议直接删除optimizable index指定的索引;
-- optimizable policy为redundancy检查项表明
--         optimizable index指定的索引的索引列刚好是base index的索引列的前面字段
--         建议直接删除optimizable index指定的索引;
-- optimizable policy为optimizable检查项
--         表明optimizable index和base index这两个索引的索引列完全重复,但是索引列的顺序不一致
--         这种场景需要人工介入分析是否可以优化
WITH info AS(
    SELECT 
        quote_ident(n.nspname) || '.' || quote_ident(c.relname) AS tablename,
        pgroup AS nodegroup,
        x.indrelid AS indrelid,
        x.indexrelid AS indexrelid,
        indisunique,
        indisprimary,
        indnatts,
        indkey,
        indexprs
    FROM pg_index x
    INNER JOIN pg_class c ON c.oid = x.indrelid
    INNER JOIN pg_class i ON i.oid = x.indexrelid
    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
    INNER JOIN pgxc_class xc ON xc.pcrelid = c.oid
    WHERE c.relkind = 'r' AND c.oid >= 16384 AND (c.reloptions IS NULL OR c.reloptions::text NOT LIKE '%internal_mask%')
    AND i.relkind = 'i' AND i.oid >= 16384
    AND x.indpred IS NULL
),

base AS(
    SELECT
        tablename,
        nodegroup,
        i.indrelid,
        i.indexrelid baseidx,
        i.indisunique AS base_unique,
        i.indisprimary AS base_primary,
        x.indexrelid AS optidx,
        x.indisunique AS opt_unique,
        x.indisprimary AS opt_primary,
        CASE WHEN opt_primary > base_primary OR opt_unique > base_unique THEN true ELSE false END AS swap,
        CASE WHEN i.indkey = x.indkey AND coalesce(pg_get_expr(i.indexprs, i.indrelid), 'NULL') = coalesce(pg_get_expr(x.indexprs, x.indrelid), 'NULL') THEN 'duplicate'::text
            WHEN x.indexprs IS NOT NULL OR i.indexprs IS NOT NULL THEN NULL::text
            WHEN strpos(i.indkey::text, x.indkey::text||' ') = 1 OR strpos(x.indkey::text, i.indkey::text||' ') = 1 THEN 'redundancy'::text
            WHEN i.indkey @> x.indkey AND x.indkey @> i.indkey THEN 'optimizable'::text
            ELSE NULL
        END AS optpolicy
    FROM info i
    INNER JOIN pg_index x ON (i.indrelid = x.indrelid AND i.indexrelid > x.indexrelid)
    WHERE x.indpred IS NULL AND optpolicy IS NOT NULL
),

tmp AS(
    SELECT
        tablename,
        indrelid,
        nodegroup,
        CASE WHEN swap THEN optidx       ELSE baseidx      END AS base_idx,
        CASE WHEN swap THEN opt_primary  ELSE base_primary END AS base_primary,
        CASE WHEN swap THEN opt_unique   ELSE base_unique  END AS base_unique,
        CASE WHEN swap THEN baseidx      ELSE optidx       END AS opt_idx,
        CASE WHEN swap THEN base_primary ELSE opt_primary  END AS opt_primary,
        CASE WHEN swap THEN base_unique  ELSE opt_unique   END AS opt_unique,
        optpolicy
    FROM base
)

SELECT
    tablename,
    nodegroup,
    base_idx::regclass::text AS base_index,
    base_primary,
    base_unique,
    substring(pg_get_indexdef(base_idx) from 'USING .+\)') AS base_idxdef,
    opt_idx::regclass::text AS opt_index,
    opt_primary,
    opt_unique,
    substring(pg_get_indexdef(opt_idx) from 'USING .+\)') AS opt_idxdef,
    optpolicy,
    pg_get_tabledef(indrelid)
FROM tmp
ORDER BY 1, 2, 3
;

 

点击关注,第一时间了解华为云新鲜技术~ 

 

标签:DWS,--,tablename,GaussDB,WHEN,个防,t1,pg,schemaname
From: https://www.cnblogs.com/huaweiyun/p/18080287

相关文章

  • 实例带你了解GaussDB的索引管理
    本文分享自华为云社区《GaussDB数据库的索引管理》,作者:Gauss松鼠会小助手2。一、引言GaussDB数据库是华为公司倾力打造的自研企业级分布式关系型数据库,索引的设计和管理对于提高查询性能至关重要。下面将通过实际例子深入研究GaussDB数据库的索引管理。二、GaussDB数据库中的......
  • GaussDB的gs_dump工具问题整理,疑似BUG
     GaussDB的gs_dump工具问题整理,疑似BUG 目前分布式GaussDB用起来问题感觉巨多啊。版本信息如下:09:04:11root@postgres>selectversion();-[RECORD1]-----------------------------------------------------------------------------------------------------------......
  • 实例带你了解GaussDB数据库的LOCK TABLE
    本文分享自华为云社区《GaussDB数据库SQL系列-LOCKTABLE》,作者:酷哥。一、前言GaussDB是一款高性能、高可用的分布式数据库,广泛应用于各类行业和场景。在GaussDB中,锁是实现并发控制的关键机制之一,用于协调多个事务之间的数据访问,确保数据的一致性和完整性。本文将围绕GaussDB数......
  • Libcomm通信库:GaussDB(DWS) 为解决建联过多的小妙招
    本文分享自华为云社区《GaussDB(DWS)集群通信系列三:Libcomm通信库》,作者:半岛里有个小铁盒。1.前言适用版本:【8.1.0(及以上)】在大规模集群、高并发业务下,如果有1000DN集群,每个stream线程需要建立1000个连接。如果1000stream并发,DN总共需要建立100万个连接,会消耗大量的连接、......
  • GaussDB命令行显示设置
     GaussDB命令行显示设置 vi~/gauss_env_fileexportPSQLRC=/home/omm/.gsqlrcvi/home/omm/.gsqlrc\setPROMPT1'%`date+%H:%M:%S`%n@%/>'\timingon效果如下:[omm@gaussdb~]$gsql-Uroot-Wxxxxxxxxxx-dpostgres-p8000-ar\setP......
  • GaussDB(DWS)集群通信:详解pooler连接池
    本文分享自华为云社区《GaussDB(DWS)集群通信系列一:pooler连接池》,作者:半岛里有个小铁盒。1.前言适用版本:【8.1.0(及以上)】GaussDB(DWS)为MPP型分布式数据库,使用ShareNothing架构,数据分散存储在各个DN节点,而CN不存储数据,作为接收查询的入口,生成的计划会尽量下推到DN并行执......
  • 手把手带你认识GaussDB轻量化运维管理工具
    本文分享自华为云社区《GaussDB轻量化运维管理工具介绍》,作者:Gauss松鼠会小助手。一、GaussDB运维管理平台简介开放生态层友好Web界面,多云皮肤个性化定制丰富的原子API公有云、合运营、HCSO、边缘云IES、HCS、轻量化、统一版本基础+智能运维能力丰富的基础运维能力......
  • GaussDB跨云容灾:实现跨地域的数据库高可用能力
    本文分享自华为云社区《GaussDB跨云容灾:实现跨地域的数据库高可用能力》,作者:GaussDB数据库。金融、银行业等对数据的安全有着较高的要求,同城容灾建设方案,在绝大多数场景下可以保证业务数据的安全性,但是在极端情况下,如遇不可抗力因素等,要保证数据的安全性,就需要采取跨地域的容灾......
  • 数智融合,华为云GaussDB(for MySQL)助力企业释放数据新价值
    2024年2月27日,在“2024年世界移动通信大会”(MobileWorldCongress2024,简称MWC2024)上,以“云原生×AI,跃迁新机遇”为主题的创原会圆桌成功举办。会上,全球企业技术精英面对面交流,围绕云原生×AI技术变革,分享企业在架构、算力、存储、数智、应用开发、媒体技术、安全体系方面的七......
  • 预算有限,资源冗余?DWS集群缩容如何帮你解决烦劳
    本文分享自华为云社区《GaussDB(DWS)华为云数仓使用实践–预算有限,资源冗余?华为云数仓集群缩容帮你解决烦劳》,作者:OneToOne。一、为什么要做缩容?在使用GaussDB(DWS)数仓时,在业务不同的时段,对数仓的计算资源大小有不同的需求。在业务繁忙、流量高峰的时候需要对DWS集群节点扩容,......