Thanks very much for both your posts.
I tried both:
First, I performed a full vacuum on the entire database then
dbn=# SELECT relname, relpages*8192/reltuples from pg_class where
reltuples <> 0 and relname not like 'pg%';
atablename | 2047.95
The first SQL statement gave me a rough idea of the tuple size while
the second SQL statement seemed to give out more details about the
table and its tuples.
dbn=# select 'atablename' as table_name, * from
pgstattuple('"public"."atablename"');
-[ RECORD 1 ]------+----------
table_name | atablename
table_len | 160137216
tuple_count | 78194
tuple_len | 129868251
tuple_percent | 81.1
dead_tuple_count | 0
dead_tuple_len | 0
dead_tuple_percent | 0
free_space | 29419740
free_percent | 18.37
129868251 / 78194 = 1660.85
There's still a difference between the two reported tuple size of
atablename: 2047.95 - 1660.85 = 387.10
Can someone shed some more light on this and which one more closely
approximates the size of the tuples?
Jared