Re: Table using more disk space than expected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Pritchard <steve(dot)pritchard(at)bto(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table using more disk space than expected
Date: 2015-09-23 16:50:27
Message-ID: 14838.1443027027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Pritchard <steve(dot)pritchard(at)bto(dot)org> writes:
> -- Average length of a row in bytes:
> select avg(octet_length(t.*::text)) FROM observation t;
> -- 287 bytes

That measurement technique doesn't have a lot to do with reality,
I'm afraid.

The contrib/pgstattuple module could give you a more reliable idea of
how much space is in use or not in the table.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jimit Amin 2015-09-23 16:50:32 Re: Table using more disk space than expected
Previous Message Steve Pritchard 2015-09-23 16:36:37 Table using more disk space than expected