estimating table size - Mailing list pgsql-general

From David Parker
Subject estimating table size
Date
Msg-id 120DB10316D2B946A3A1BEFB82324BB1859962@kodos.tazznetworks.com
Whole thread Raw
Responses Re: estimating table size  (Ian Barwick <barwick@gmail.com>)
List pgsql-general
Given a table, foo, created in a database but not populated, is there a
procedure that will return an estimate of the size of a given tuple in
that table? It looks like pgstattuple reports on actual table pages; I'm
looking for something that reads the lengths of each row, and knows what
the storage overhead would be (extra 4 bytes for varchar, for instance).

Alternatively, is there documentation somewhere that can give me a good
rule of thumb for this? I can add up the lengths of the columns and make
my own judgements about averages for varchar columns. The "hidden"
storage overhead is what I'm wondering about, I guess.

Thanks.

-  DAP
======================================================
David Parker    Tazz Networks    (401) 709-5130



pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: vacuumdb hanging database cluster
Next
From: Igor Shevchenko
Date:
Subject: parsing binary varchar[]-s