How much size saved by updating column to NULL ?

From: Sébastien TANIERE <seb(dot)taniere(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: How much size saved by updating column to NULL ?
Date: 2024-01-12 10:53:32
Message-ID: CA+xUx5=SypY4Ga6x4eB1VitgXnQWWpHJp_rJqWoZu50yk26wsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
in my company, some columns rarely used in a PG database 14.8 have been set
to NULL in order to save disk space (datecreation & acteurcreation in
following table) .

create table example
(
id varchar(25) not null,
datecreation timestamp(6),
acteurcreation varchar(50),
valeurunit smallint
)

I am wondering if it is really useful for every type of column.
Intuitively, i would say that it does not save space for fixed field
datecreation as it is a fixed size column.

Do we save 8 bytes by timestamp column updated to NULL or not ?

Have a good day

Sébastien TANIERE

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeremiah Bauer 2024-01-12 12:34:37 Re: [EXTERNAL]Re: Refresh Materialized View Issue
Previous Message Alban Hertroijs 2024-01-12 10:01:57 Re: Time zone offset in to_char()