每个数据库的Postgresql关系限制
在Postgresql文档附录K()中有一个限制列表:每个数据库的Postgresql关系限制,postgresql,Postgresql,在Postgresql文档附录K()中有一个限制列表: +------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+ | Item | Upper Limit
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| Item | Upper Limit | Comment |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| database size | unlimited | |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| number of databases | 4,294,950,911 | |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| relations per database | 1,431,650,303 | |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| relation size | 32 TB | with the default BLCKSZ of 8192 bytes |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| rows per table | limited by the number of tuples that can fit onto 4,294,967,295 pages | |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| columns per table | 1600 | further limited by tuple size fitting on a single page; see note below |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| field size | 1 GB | |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| identifier length | 63 bytes | can be increased by recompiling PostgreSQL |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| indexes per table | unlimited | constrained by maximum relations per database |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| columns per index | 32 | can be increased by recompiling PostgreSQL |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
| partition keys | 32 | can be increased by recompiling PostgreSQL |
+------------------------+-----------------------------------------------------------------------+------------------------------------------------------------------------+
“每个数据库的关系”一行是指数据库中每行的关系总数,或者是声明的外键数
例如,有一个外键连接两个表的两个表在数据库中算作1个关系?或者作为1*行(1.000行等于1.000关系)
非常感谢您的帮助:)请参见此处:
关系本质上是表的一个数学术语
“关系”是存储在目录表
pg_class
中的任何内容:表、视图、序列、索引、物化视图、分区表和分区索引
这个限制主要是理论上的,实际上,如果你有100000个左右的关系,你会遇到麻烦。“关系”可能意味着表、视图等。