db2v11 最多可以创建有32767个分区
A partitioned table simplifies the rolling in and rolling out of table data and a partitioned table can contain vastly more data than an ordinary table. You can create a partitioned table with a maximum of 32,767 data partitions. Data partitions can be added to, attached to, and detached from a partitioned table, and you can store multiple data partition ranges from a table in one table space.
在Db2和Db2 9.7中,一个表最多可以创建4096个分区。这个限制是由于每个分区都需要一个独立的数据结构来存储分区的元数据信息,因此如果分区过多,会导致存储空间的浪费和性能下降。
另外,需要注意的是,分区数目的选择应该根据实际情况进行权衡。如果分区数目过多,可能会导致查询性能下降,因为查询时需要扫描更多的分区。而如果分区数目过少,可能会导致数据不均匀分布,从而影响查询性能和负载均衡。因此,在选择分区数目时,需要考虑到数据量、查询模式、硬件配置等多方面因素,以达到最优的性能和可扩展性。