什么是表分区?

发布于 2024-08-13 04:11:20 字数 22 浏览 5 评论 0原文

什么情况下我们应该使用表分区?

In which case we should use table partitioning?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

旧街凉风 2024-08-20 04:11:20

一个例子可能会有所帮助。

我们每天从 124 家杂货店收集数据。每天的数据都与其他日期完全不同。我们按日期对数据进行分区。这使我们能够更快地
因为oracle可以使用分区索引并快速消除所有不相关的天数。
这还使备份操作变得更加容易,因为您可以仅在新分区中工作。
此外,在 5 年的数据之后,我们需要删除一整天的数据。您可以一次“删除”或消除整个分区,而不是删除行。因此,删除旧数据是轻而易举的事。

所以...它们适用于大量数据,并且在某些情况下非常有利于提高性能。

An example may help.

We collected data on a daily basis from a set of 124 grocery stores. Each days data was completely distinct from every other days. We partitioned the data on the date. This allowed us to have faster
searches because oracle can use partitioned indexes and quickly eliminate all of the non-relevant days.
This also allows for much easier backup operations because you can work in just the new partitions.
Also after 5 years of data we needed to get rid of an entire days data. You can "drop" or eliminate an entire partition at a time instead of deleting rows. So getting rid of old data was a snap.

So... They are good for large sets of data and very good for improving performance in some cases.

染柒℉ 2024-08-20 04:11:20

分区使表和索引或索引组织表能够细分为更小的可管理块,每个小块称为“分区”。

Partitioning enables tables and indexes or index-organized tables to be subdivided into smaller manageable pieces and these each small piece is called a "partition".

以往的大感动 2024-08-20 04:11:20

当您想要将表分解为更小的表(基于某些逻辑分解)以提高性能时。因此,现在用户可以将表作为一个表名称来引用,或者引用其中的各个分区。

When you want to break a table down into smaller tables (based on some logical breakdown) to improve performance. So now the user can refer to tables as one table name or to the individual partitions within.

酒废 2024-08-20 04:11:20

表分区是一些数据库管理系统用来处理大型数据库的技术。他们不是使用单个表存储位置,而是将表拆分为多个文件,以便更快地查询。

如果您有一个将存储大量数据的表(我的意思是真正的大量数据,例如数百万条记录),那么表分区将是一个不错的选择。

Table partitioning consist in a technique adopted by some database management systems to deal with large databases. Instead of a single table storage location, they split your table in several files for quicker queries.

If you have a table which will store large ammounts of data (I mean REALLY large ammounts, like millions of records) table partitioning will be a good option.

余生一个溪 2024-08-20 04:11:20

i) 它是将单个表细分为多个段(称为分区),每个段保存一个值的子集。

ii) 当你阅读了文档,运行了一些测试用例,充分理解了它的优点和缺点,并发现它会有好处时,你应该使用它。

您不会在论坛上得到完整的答案。去阅读文档,当您遇到可管理的问题时再回来。

i) It is the subdivision of a single table into multiple segments, called partitions, each of which holds a subset of values.

ii) You should use it when you have read the documentation, run some test cases, fully understood the advantages and disadvantages of it, and found that it will be of benefit.

You are not going to get a complete answer on a forum. Go and read the documentation and come back when you have a manageable problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文