CREATE TABLE tab_### ( id SERIAL NOT NULL PRIMARY KEY, value TEXT NOT NULL );
fsync=off
Note translator : Sequences will be automatically created for SERIAL fields, while indices will be created for PRIMARY KEY constraints. But that is not all. In view of the fact that the second field is of type TEXT, the server will also create a TOAST table for each table along with a unique index.
The comments to the original article cited such mathematical calculations. Each table actually creates 5 objects: the table itself, the sequence, the index, the TOAST table, the index on the TOAST table. Each such group eats up on a 24KB disk (3 x 8 + 2 x 0). Even ignoring the size of the system catalog, such a number of objects will occupy 22.3TB.
If we add to this the size of the system catalog, then the size will increase by 12TB and amount to 34TB.
Source: https://habr.com/ru/post/120008/
All Articles