What are partitioned tables called in PostgreSQL?-问答-阿里云开发者社区-阿里云

开发者社区> 1780169608831412> 正文

What are partitioned tables called in PostgreSQL?

2021-10-16 15:03:59 36 1

What are partitioned tables called in PostgreSQL?

取消 提交回答
全部回答(1)
  • 无敌小将
    2021-10-16 16:27:02
    已采纳

    Partitioned tables are logical structures that are used for dividing large tables into smaller structures that are called partitions. This approach is used for effectively increasing the query performance while dealing with large database tables. To create a partition, a key called partition key which is usually a table column or an expression, and a partitioning method needs to be defined.

    There are three types of inbuilt partitioning methods provided by Postgres:

    Range Partitioning: This method is done by partitioning based on a range of values. This method is most commonly used upon date fields to get monthly, weekly or yearly data. In the case of corner cases like value belonging to the end of the range, for example: if the range of partition 1 is 10-20 and the range of partition 2 is 20-30, and the given value is 10, then 10 belongs to the second partition and not the first.

    List Partitioning: This method is used to partition based on a list of known values. Most commonly used when we have a key with a categorical value. For example, getting sales data based on regions divided as countries, cities, or states.

    Hash Partitioning: This method utilizes a hash function upon the partition key. This is done when there are no specific requirements for data division and is used to access data individually. For example, you want to access data based on a specific product, then using hash partition would result in the dataset that we require.

    The type of partition key and the type of method used for partitioning determines how positive the performance and the level of manageability of the partitioned table are.

    1 0
相关问答

17

回答

【大咖问答】对话PostgreSQL 中国社区发起人之一,阿里云数据库高级专家 德哥

阿里ACE 彭飞 2019-07-10 09:36:10 968038浏览量 回答数 17

145

回答

【新手入门】云服务器linux使用手册

fanyue88888 2012-11-26 17:14:18 157084浏览量 回答数 145

8

回答

OceanBase 使用动画(持续更新)

mq4096 2019-02-20 17:16:36 333871浏览量 回答数 8

3

回答

请问postgres实时同步数据到mysql数据库有什么好的方案吗?

toni3 2019-06-29 14:55:43 115797浏览量 回答数 3

2

回答

mySQL数据库报错You have an error in your SQL syntax

落地花开啦 2016-02-14 16:09:24 126483浏览量 回答数 2

38

回答

安全组详解,新手必看教程

我的中国 2017-11-30 15:23:46 256869浏览量 回答数 38

249

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 302602浏览量 回答数 249

97

回答

Redhat/CentOS一键安装web环境全攻略

xiaofanqie 2011-08-11 14:51:38 123209浏览量 回答数 97

2

回答

区域选择帮助

fanyue88888 2012-12-07 15:54:30 204008浏览量 回答数 2

11

回答

【精品问答合集】MongoDB热门问答

李博 bluemind 2019-05-29 16:50:19 120872浏览量 回答数 11
0
文章
315
问答
推荐问答
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载