4 ms·
Also remember to create tables using efficient structure packing and reordering[1], taking into consideration how the storage serializer operates (see [2] for P
by dhx 5y ago
Also remember to create tables using efficient structure packing and reordering[1], taking into consideration how the storage serializer operates (see [2] for PostgreSQL). An example provided by Gitlab[3] demonstrates structure packing and reordering principles in PostgreSQL. It may also be beneficial depending on types of workload to limit the number of columns in a table to optimise for locality of reference[4] once the data is deserialized into memory.
[1] http://www.catb.org/esr/structure-packing/ http://www.catb.org/esr/structure-packing/
[2] https://www.postgresql.org/docs/14/storage-page-layout.html https://www.postgresql.org/docs/14/storage-page-layout.html
[3] https://docs.gitlab.com/ee/development/ordering_table_columns.html https://docs.gitlab.com/ee/development/ordering_table_column...
[4] https://en.wikipedia.org/wiki/Locality_of_reference https://en.wikipedia.org/wiki/Locality_of_reference