Re: Raw size - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Raw size
Date
Msg-id 1110783670.22083.3.camel@fuji.krosing.net
Whole thread Raw
In response to Raw size  (Ioannis Theoharis <theohari@ics.forth.gr>)
List pgsql-hackers
Ühel kenal päeval (neljapäev, 10. märts 2005, 20:07+0200), kirjutas
Ioannis Theoharis:
>
> Hi,
>
> i have a table:
>
> create table triples(
>     att0 varchar(1000),
>     att1 int4,
>     att2 varchar(20),
>     att3 varchar(1000)
> )
>
> My table has 990 raws.
>
> The (possibly wrong) way, with wich i compute the size of the table is:

Varchar fields (actually most *char and text fields) use only actual
length bytes + some overhead for tuple header + page header, so unless
you fill all varchar(1000) fields with exactly 1000-byte strings, you
should use less than that.


> Is there any compression or what?

Compression is not used for tuples under 2k, so there _may_ be
coimpression depending on your exact data and TOAST settings.

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
--
Hannu Krosing <hannu@tm.ee>


pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: [BUGS] We are not following the spec for HAVING without
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] How to read query plan