Database Table Partitioning

 
http://en.wikipedia.org/wiki/Partition_(database)
引用
常见的为 table 做 partitioning 的策略有:
Range partitioning
Selects a partition by determining if the partitioning key is inside a certain range. An example could be a partition for all rows where the column zipcode has a value between 70000 and 79999.
List partitioning
A partition is assigned a list of values. If the partitioning key has one of these values, the partition is chosen. For example all rows where the column Country is either Iceland, Norway, Sweden, Finland or Denmark could build a partition for the Nordic countries.
Hash partitioning
The value of a hash function determines membership in a partition. Assuming there are four partitions, the hash function could return a value from 0 to 3.


postgresql:
postgresql支持 Range 和 List 两种方式的 partitioning:
http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html
引用
The following forms of partitioning can be implemented in PostgreSQL:
Range Partitioning
The table is partitioned into "ranges" defined by a key column or set of columns, with no overlap between the ranges of values assigned to different partitions. For example one might partition by date ranges, or by ranges of identifiers for particular business objects.
List Partitioning
The table is partitioned by explicitly listing which key values appear in each partition.

猜你喜欢

转载自wuaner.iteye.com/blog/1844366