You are here: Chapter 10: Database Administration > Field Limit Specifications

Field Limit Specifications

Microsoft SQL Express / SQL Server

Column width limit of 8060. The total of the size of all the varchar columns in one particular table can only add up to 8060.  If they add up to a larger number, the table itself can exist, and more fields can still be added, but if you create an issue that uses more than 8060 characters of total varchar space, the issue is not added and an error is logged.

Oracle

1000 columns

MySQL

65535 characters, excluding blobs.

DB2

Description 4K page size limit 8K page size limit

1 Most columns in a table 500 1 012

3 Maximum length of a row including all overhead b 4 005 8 101

4 Maximum size of a table per partition (in gigabytes) c 64 128

15 Most elements in a select list 500 1 012

17 Maximum number of columns in a GROUP BY clause 500 1 012

18 Maximum total length of columns in a GROUP BY clause (in bytes) 4 005 8 101

19 Maximum number of columns in an ORDER BY clause 500 1 012

20 Maximum total length of columns in an ORDER BY clause (in bytes) 4 005 8 101

29 Most values in an INSERT statement 500 1 012

30 Most SET clauses in a single UPDATE statement 500 1 012

45 Maximum size of a regular DMS table space (in gigabytes)c 64 128

53 Most table objects in DMS table space f 6 648 13 305

Postgresql

Maximum size for a database  is effectively unlimited, although you may see performance problems with more than a few thousand tables in a database, depending on how gracefully your file system copes with directories containing many files.

Maximum size for a table is 2G blocks, hence 16 to 64 terabytes depending on the BLCKSZ configuration constant.

Maximum size for a row - See limits on field size and number of columns.

Maximum size for an individual field value - Field values are limited to 1Gb, and in practice are more tightly limited by memory/swap space available to a back-end; a field value that is a large fraction of the maximum process memory size will probably cause out-of-memory failures.

Maximum number of columns in a table - 1600. In practice probably quite a bit less, even with TOAST, since the master tuple still has to fit in a block. If all the columns are large (toastable) then at most you could fit about 250 columns with BLCKSZ=8K, since an out-of-line TOAST value pointer takes 32 bytes. On the other hand, 1600 int4 columns would fit easily.

Maximum number of rows in a table - No specific limit. Note however that the COUNT() function currently uses an int4 counter, giving incorrect results for more than 2G rows.

Maximum number of indexes on a table - No limit.