数据库分区的最佳大小 [英] Optimal size for Database partitions

查看:112
本文介绍了数据库分区的最佳大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个非常简单,非常大的PostgreSQL数据库。数据库将有大约100亿行,这意味着我正在将它分成几个表。但是,我找不到任何有关我们应该分成多少分区的信息。

I am creating a very simple, very large Postgresql database. The database will have around 10 billion rows, which means I am looking at partitioning it into several tables. However, I can't find any information on how many partitions we should break it into.

我不知道什么类型的查询,它不可能提出一个完美的分区方案,但有什么规则的分区大小?

I don't know what type of queries to expect as of yet, so it won't be possible to come up with a perfect partitioning scheme, but are there any rules of thumb for partition size?

干杯,

Adrian。

推荐答案

这篇文章 Lane建议分区的数量目前不是为
设计的,而是经过几十个分区。分区本身的大小不应该影响性能,否则分裂它。

This post by Tom Lane suggested that the number of partitions isn't currently designed to scale past a few dozen partitions. The size of the partitions themselves shouldn't effect performance anymore than splitting it up otherwise.

这篇关于数据库分区的最佳大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆