PostgreSQL11preview-分割槽表增強彙總
標籤
PostgreSQL , 分割槽表 , 增強 , 11
背景
PostgreSQL 11 分割槽表有非常多的增強特性。
E.1.3.1.1. Partitioning
-
Allow faster partition elimination during query processing (Amit Langote, David Rowley, Dilip Kumar)
This speeds access to partitioned tables with many partitions.
加速分割槽過濾,在分割槽數較多時,效能相比以前的版本有效能提升。
《PostgreSQL 11 preview 分割槽過濾控制引數 – enable_partition_pruning》
-
Allow partition elimination during query execution (David Rowley, Beena Emerson)
允許在execute階段消除不需要的分割槽訪問,以前只能在PLAN時消除不需要的分割槽訪問。(使得JOIN, prepared statement也可以在exexute階段消除不需要訪問的分割槽)
Previously partition elimination could only happen at planning time, meaning many joins and prepared queries could not use partition elimination.
-
Allow the creation of partitions based on hashing a key (Amul Sul)
支援雜湊分割槽。
《PostgreSQL 11 preview – 分割槽表用法及增強 – 增加HASH分割槽支援 (hash, range, list)》
-
Allow updated rows to automatically move to new partitions based on the new row contents (Amit Khandekar)
允許UPDATE分割槽欄位值,自動將新記錄寫入新的分割槽表中。
-
Allow partitioned tables to have a default partition (Jeevan Ladhe, Beena Emerson, Ashutosh Bapat, Rahila Syed, Robert Haas)
支援預設分割槽(當資料不滿足所有分割槽規則時,放入預設分割槽中)
The default partition can store rows that don`t match any of the other defined partitions, and is searched accordingly.
-
Allow UNIQUE indexes on partitioned tables if the partition key guarantees uniqueness (Álvaro Herrera, Amit Langote)
允許在分割槽鍵上建立唯一索引。
-
Allow indexes on a partitioned table to be automatically created in any child partitions (Álvaro Herrera)
在分割槽表主表上建立的索引,將來新增分割槽時,自動建立對應定義的索引。
如果分割槽是ATTACH上來的,並且已經存在索引時,可以把這個索引掛載到在分割槽表主表上建立的全域性索引上(只要定義一致)。掛載方法類似繼承關係的掛載。
ALTER INDEX name ATTACH PARTITION index_name; (name是分割槽表上的本地索引名, index_name是分割槽表主表上的索引名.)
The new command ALTER INDEX ATTACH PARTITION allows indexes to be attached to partitions.
This does not behave as a global index since the contents are private to each index. WARN WHEN USING AN EXISTING INDEX?
-
Allow foreign keys on partitioned tables (Álvaro Herrera)
分割槽表支援foreign key.
-
Allow INSERT, UPDATE, and COPY on partitioned tables to properly route rows to foreign partitions (Etsuro Fujita, Amit Langote)
允許postgres_fdw的外部表,作為分割槽,同時允許insert,update,copy資料路由到對應外部表分割槽。
This is supported by postgres_fdw foreign tables.
-
Allow FOR EACH ROW triggers on partitioned tables (Álvaro Herrera)
允許對分割槽表主表建立觸發器,同時這些觸發器自動建立到所有分割槽上,並且未來新增的分割槽,也會自動建立對應觸發器。
Creation of a trigger on partitioned tables automatically creates triggers on all partition tables, and on newly-created ones.
支援deferred unique約束,在事務結束時檢查UNIQUE約束。
This also allows deferred unique constraints on partitioned tables.
-
Allow equality joins between partitioned tables with identically partitioned child tables to join the child tables directly (Ashutosh Bapat)
《PostgreSQL 11 preview – 分割槽表智慧並行JOIN (已類似MPP架構,效能暴增)》
This features is disabled by default but can be enabled by changing enable_partitionwise_join.
-
Perform aggregation on each partition, and then merge the results (Jeevan Chalke, Ashutosh Bapat, Robert Haas)
《PostgreSQL 11 preview – 分割槽表智慧並行聚合、分組計算(已類似MPP架構,效能暴增)》
This features is disabled by default but can be enabled by changing enable_partitionwise_aggregate.
-
Allow postgres_fdw to push down aggregates to foreign tables that are partitions (Jeevan Chalke)
支援postgres_fdw外部表作為分割槽,並支援將聚合下推到對應的外部資料來源執行。
相關文章
- PostgreSQL11preview-索引增強彙總SQLView索引
- PostgreSQL11preview-平行計算增強彙總SQLView
- PostgreSQL11preview-優化器增強彙總SQLView優化
- oracle分割槽表和分割槽表exchangeOracle
- oracle分割槽表和非分割槽表exchangeOracle
- SqlServer關於分割槽表的總結SQLServer
- PostgreSQL/LightDB 分割槽表之分割槽裁剪SQL
- 【趙渝強老師】Hive的分割槽表Hive
- PG的非分割槽表線上轉分割槽表
- 【MYSQL】 分割槽表MySql
- 非分割槽錶轉換成分割槽表
- [oracle] expdp 匯出分割槽表的分割槽Oracle
- Oracle分割槽表基礎運維-07增加分割槽(3列表分割槽)Oracle運維
- oracle 分割槽表move和包含分割槽表的lob moveOracle
- 移動分割槽表和分割槽索引的表空間索引
- Oracle分割槽表基礎運維-04列表分割槽Oracle運維
- Oracle分割槽表基礎運維-07增加分割槽(2 HASH分割槽)Oracle運維
- MySQL 分割槽表探索MySql
- 分割槽表-實戰
- PostgreSQL11preview-索引優化。filter智慧消除、分割槽索引智慧合併SQLView索引優化Filter
- Oracle分割槽表基礎運維-06分割槽表索引Oracle運維索引
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- oracle 線上重新定義,普通表改變分割槽表,分割槽表可以更改型別、分割槽欄位等Oracle型別
- Oracle分割槽表基礎運維-07增加分割槽(1範圍分割槽)Oracle運維
- Oracle分割槽表基礎運維-01分割槽表分類Oracle運維
- Hive中靜態分割槽和動態分割槽總結Hive
- Oracle分割槽表基礎運維-09刪除分割槽Oracle運維
- Oracle分割槽表基礎運維-05組合分割槽Oracle運維
- Oracle分割槽表基礎運維-02範圍分割槽Oracle運維
- Oracle分割槽表基礎運維-03HASH分割槽Oracle運維
- 分割槽表之自動增加分割槽(11G)
- SQL SERVER之分割槽表SQLServer
- ORACLE分割槽表梳理系列Oracle
- Spark操作Hive分割槽表SparkHive
- OceaBase 分割槽表建立技巧
- Mysql表分割槽實現MySql
- mysql 進行表分割槽MySql
- Mysql表分割槽實操MySql