PostgreSQL 11 preview - 并行计算 增强 汇总

本文涉及的产品
云原生数据库 PolarDB MySQL 版,Serverless 5000PCU 100GB
云原生数据库 PolarDB 分布式版,标准版 2核8GB
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

标签

PostgreSQL , 并行 , 增强 , 11


背景

PostgreSQL 11 并行计算能力的增强。

E.1.3.1.2. Parallel Queries

  • Allow btree indexes to be built in parallel (Peter Geoghegan, Rushabh Lathia, Heikki Linnakangas)

    支持并行排序,支持并行创建索引(并行写索引文件)。

    《PostgreSQL 11 preview - 并行排序、并行索引 (性能线性暴增) 单实例100亿TOP-K仅40秒》

  • Allow hash joins to be performed in parallel using a shared hash table (Thomas Munro)

    HASH JOIN支持共享哈希表了。原来是每个parallel worker进程一份哈希表副本。

  • Allow UNION to run each SELECT in parallel if the individual SELECTs cannot be parallelized (Amit Khandekar, Robert Haas, Amul Sul)

    当各个UNION ALL内的子句无法支持并行时,PostgreSQL 11会选择union的各个子句并行。

    https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0927d2f46ddd4cf7d6bf2cc84b3be923e0aedc52

    query1 union query2 union query3;  
    
    当query1,query2,query3 这些QUERY本身无法并行执行时。  
    
    PostgreSQL 11, 选择让 query1,query2,query3 同时执行。  
    
    老版本, 无法并行。  
    

    《PostgreSQL 11 preview - Parallel Append(包括 union all\分区查询) (多表并行计算) sharding架构并行计算核心功能之一》

  • Allow partition scans to more efficiently use parallel workers (Amit Khandekar, Robert Haas, Amul Sul)

    同上,支持paralle append扫描多个子分区。

  • Allow LIMIT to be passed to parallel workers (Robert Haas, Tom Lane)

    This allows workers to reduce returned results and use targeted index scans.

    允许LIMIT子句下层到各个paralle worker进程。加速带LIMIT的并行查询。

  • Allow single-evaluation queries, e.g. WHERE clause aggregate queries, and functions in the target list to be parallelized (Amit Kapila, Robert Haas)

    允许"单次评估的QUERY"并行执行,例如"where子句中的聚合子句","select目标中的函数"。

  • Add server option parallel_leader_participation to control if the leader executes subplans (Thomas Munro)

    The default is enabled, meaning the leader will execute subplans.

    Allows the leader process to execute the query plan under Gather and Gather Merge nodes instead of waiting for worker processes. The default is on. Setting this value to off reduces the likelihood that workers will become blocked because the leader is not reading tuples fast enough, but requires the leader process to wait for worker processes to start up before the first tuples can be produced. The degree to which the leader can help or hinder performance depends on the plan type, number of workers and query duration.

    允许parallel leader 进程在gather或gather merge节点主动接收worker进程产生的数据,而不是等待。

  • Allow parallelization of commands CREATE TABLE .. AS, SELECT INTO, and CREATE MATERIALIZED VIEW (Haribabu Kommi)

    允许CREATE TABLE .. AS, SELECT INTO, and CREATE MATERIALIZED VIEW这几类SQL并行执行。

  • Improve performance of sequential scans with many parallel workers (David Rowley)

    并行全表扫描性能增强。

  • Add reporting of parallel worker sort activity to EXPLAIN (Robert Haas, Tom Lane)

    explain增加输出详情,包括parallel worker节点排序的统计信息。

相关实践学习
使用PolarDB和ECS搭建门户网站
本场景主要介绍基于PolarDB和ECS实现搭建门户网站。
阿里云数据库产品家族及特性
阿里云智能数据库产品团队一直致力于不断健全产品体系,提升产品性能,打磨产品功能,从而帮助客户实现更加极致的弹性能力、具备更强的扩展能力、并利用云设施进一步降低企业成本。以云原生+分布式为核心技术抓手,打造以自研的在线事务型(OLTP)数据库Polar DB和在线分析型(OLAP)数据库Analytic DB为代表的新一代企业级云原生数据库产品体系, 结合NoSQL数据库、数据库生态工具、云原生智能化数据库管控平台,为阿里巴巴经济体以及各个行业的企业客户和开发者提供从公共云到混合云再到私有云的完整解决方案,提供基于云基础设施进行数据从处理、到存储、再到计算与分析的一体化解决方案。本节课带你了解阿里云数据库产品家族及特性。
相关文章
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之1 - parallel seq scan
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan parallel index scan parallel index only scan
4630 0
|
SQL 弹性计算 关系型数据库
PostgreSQL 12 preview - CTE 增强,支持用户语法层控制 materialized 优化
标签 PostgreSQL , CTE , materialized , not materialized , push down 背景 PostgreSQL with 语法,能跑非常复杂的SQL逻辑,包括递归,多语句物化计算等。 在12以前的版本中,WITH中的每一个CTE(common table express),都是直接进行物化的,也就是说外层的条件不会推到CTE(物化节点)里
828 0
|
弹性计算 关系型数据库 数据库连接
PostgreSQL 12 preview - Move max_wal_senders out of max_connections for connection slot handling
标签 PostgreSQL , max_wal_senders , max_connections , sorry, too many clients already 背景 如果你需要使用PG的流复制,上游节点的max_wal_senders参数,用来限制这个节点同时最多可以有多少个wal sender进程。 包括逻辑复制、物理复制、pg_basebackup备份等,只要是使用stre
337 0
|
弹性计算 安全 关系型数据库
PostgreSQL 12 preview - 可靠性提升 - data_sync_retry 消除os层write back failed status不可靠的问题
标签 PostgreSQL , data_sync_retry , write back , retry , failed status 背景 有些OS系统,对fsync的二次调用不敏感,因为OS层可能有自己的CACHE,如果使用了buffer write,并且出现write back failed的情况,有些OS可能在下次fsync时并不能正确的反馈fsync的可靠性与否。(因为这个B
515 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之13 - parallel OLAP : 中间结果 parallel with unlogged table
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan parallel
579 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之14 - parallel index scan
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan paral
1066 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之15 - parallel bitmap scan
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan
1136 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之16 - parallel index only scan
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan
717 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之17 - parallel nestloop join
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan
333 0
|
SQL 分布式计算 并行计算
PostgreSQL 并行计算解说 之18 - parallel merge join
标签 PostgreSQL , cpu 并行 , smp 并行 , 并行计算 , gpu 并行 , 并行过程支持 背景 PostgreSQL 11 优化器已经支持了非常多场合的并行。简单估计,已支持27余种场景的并行计算。 parallel seq scan
839 0

相关产品

  • 云原生数据库 PolarDB