可能的重复:
PostgreSQL 选择查询中的最大列数是多少 https://stackoverflow.com/questions/12606842/what-is-the-maximum-number-of-columns-in-a-postgresql-select-query
我将开始一个需要大量表和列的新项目,使用 postgres 我只想问创建 postgres 表时的列数是否有限,如果是,那么列数的最大值是多少在 CREATE 和 SELECT 语句中?
Since Postgres 12,可以找到官方的限制列表在手册中 https://www.postgresql.org/docs/current/limits.html:
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
在此之前,有一个PostgresL“关于”页面上的官方列表 https://www.postgresql.org/about/。报价为Postgres 9.5:
Limit Value
Maximum Database Size Unlimited
Maximum Table Size 32 TB
Maximum Row Size 1.6 TB
Maximum Field Size 1 GB
Maximum Rows per Table Unlimited
Maximum Columns per Table 250 - 1600 depending on column types
Maximum Indexes per Table Unlimited
如果你接近这些极限,那么你很可能正在做某事wrong.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)