PostgreSQL 11 preview - Faster partition pruning
标签
PostgreSQL , 分区 , 继承 , constraint_exclusion
背景
目前PG社区版本内置分区表的性能受制于一些BIND、LOCK所有子表等问题,当分区过多时,性能会受到极大的影响。
《分区表锁粒度差异 - pg_pathman VS native partition table》
《PostgreSQL 查询涉及分区表过多导致的性能问题 - 性能诊断与优化(大量BIND, spin lock, SLEEP进程)》
不过还好pg_pathman这个插件弥补了以上问题。同时EDB发行的商用PG版本,在分区上面也有一些改进。
社区中,有一些committer关注到了这样的问题,同时提出了一些解法,已经将partition的选择代码进行了改造,采用的方法可能与EDB商用发型版本类似。
第一个相关patch如下
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9fdb675fc5d2de825414e05939727de8b120ae81
Faster partition pruning Add a new module backend/partitioning/partprune.c, implementing a more
sophisticated algorithm for partition pruning. The new module uses each
partition's "boundinfo" for pruning instead of constraint exclusion,
based on an idea proposed by Robert Haas of a "pruning program": a list
of steps generated from the query quals which are run iteratively to
obtain a list of partitions that must be scanned in order to satisfy
those quals. At present, this targets planner-time partition pruning, but there exist
further patches to apply partition pruning at execution time as well. This commit also moves some definitions from include/catalog/partition.h
to a new file include/partitioning/partbounds.h, in an attempt to
rationalize partitioning related code. Authors: Amit Langote, David Rowley, Dilip Kumar
Reviewers: Robert Haas, Kyotaro Horiguchi, Ashutosh Bapat, Jesper Pedersen.
Discussion: https://postgr.es/m/098b9c71-1915-1a2a-8d52-1a7a50ce79e8@lab.ntt.co.jp
这个patch还有一些连带的patch,未来社区版本的分区表应该不会再有bind, lock所有分区的问题了。
https://commitfest.postgresql.org/17/1330/
参考
《分区表锁粒度差异 - pg_pathman VS native partition table》
《PostgreSQL 查询涉及分区表过多导致的性能问题 - 性能诊断与优化(大量BIND, spin lock, SLEEP进程)》
《PostgreSQL 商用版本EPAS(阿里云ppas) - 分区表性能优化 (堪比pg_pathman)》
《PostgreSQL 10 内置分区 vs pg_pathman perf profiling》
PostgreSQL 11 preview - Faster partition pruning相关推荐
- PostgreSQL 11 preview - bloom filter 误报率评估测试及如何降低误报 - 暨bloom filter应用于HEAP与INDEX的一致性检测...
标签 PostgreSQL , bloom filter , 误报率 , amcheck 背景 bloom filter是一个空间压缩,概率数据结构,可以存储超容量的数据集,用于判断某个元素是否存在于 ...
- PostgreSQL 11 preview - Surjective indexes - 索引HOT增强(表达式)update评估
标签 PostgreSQL , 表达式索引 , 表达式结果变化评估 , projection function , 多值索引 , GIN , 多值元素变化 背景 PostgreSQL 11马上要提交的 ...
- PostgreSQL 11 preview - Allow on-line enabling and disabling of data checksums
标签 PostgreSQL , checksum , online modify , pg_verify_checksums , pg_enable_data_checksums , pg_disab ...
- PostgreSQL 11 新特性之哈希分区
文章目录 PostgreSQL 10 引入了声明式分区(declarative partitioning)特性,但是实现的功能有限.PostgreSQL 11 为此带来了许多关于分区的增强功能.首先就 ...
- PostgreSQL 11 tpcc 测试(103万tpmC on ECS) - use sysbench-tpcc by Percona-Lab
标签 PostgreSQL , tpcc 背景 环境 阿里云虚拟机 [root@pg11-test ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32- ...
- CentOS 7 源码编译安装 PostgreSQL 11.2
环境 系统版本 Centos7.6 工具:xshell6 PostgreSql: postgresql-11.2.tar.gz 安装部署 安装前准备 官网下载PostgreSQL 11.2源码地址:h ...
- PostgreSQL 11 100亿 tpcb 性能测试 on ECS
标签 PostgreSQL , tpcb , pgbench , 100亿 背景 PostgreSQL 11 发布在即,以下是tpcc与tpch测试的结果: <PostgreSQL 11 tpc ...
- PostgreSQL 11 1Kw TPCC , 1亿 TPCB 7*24 强压耐久测试
标签 PostgreSQL , tpcc , tpcb 背景 TPCC, TPCB是工业标准的OLTP类型业务的数据库测试,包含大量的读.写.更新.删除操作. 7*24小时强压耐久测试,主要看数据库在 ...
- 在Ubuntu 18.04上安装PostgreSQL 11和PgAdmin4
In this guide, you will learn how to install PostgreSQL 11 and PgAdmin4 on Ubuntu 18.04 LTS. 在本指南中,您 ...
- PostgreSQL 11 与 pgAdmin4 在 Windows 平台上的安装和使用
文章目录 1.下载 2.解压后,添加环境配置 3.创建 Database Cluster 4.启动 vs 停止,注册 Windows 服务 5.角色 6.pgAdmin4 7.psql 8.配置远程访 ...
最新文章
- UE4 AR开发笔记
- 安卓惯性传感器(一)
- Synchronize锁重入
- 树型列表结构宽度调整_Material Design 网格列表
- 将list对象转换为QuerySet对象
- 点/线/面 等 几何关系运算 的网页 推荐+备忘
- 小米11渲染图曝光:屏下摄像头技术现身还有方形5摄相机模组
- 旅游管理系统项目java设计_基于JSP的旅游管理系统设计与实现(MyEclipse,SQL)
- 小学生 计算机编程 教程,小学生C++创意编程(视频教学版)
- 成为一名初级游戏策划
- java jco sap 重连_SAP R3和JAVA交换数据之JCO
- 计算机组老师颁奖词,学校优秀老师颁奖词
- Linux系统安全及应用详解
- 远程桌面 中断计算机连接不上,中断远程桌面连接解决方案
- 完善智慧办公建设,小熊U租获京东数千万元A+轮融资
- c++直方图匹配终极版,支持任意通道数(opencv版本)
- 【GamePlay】UGUI的注意事项
- SQL Server 数据库修复专家SQLRescue
- 服务器安全神器,Linux 上安装 Fail2Ban 保护 SSH
- 计算机科学新技术新应用发展,新技术的发展和应用