Re: Raw size

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Raw size
Date: 2005-03-14 07:01:09
Message-ID: 1110783670.22083.3.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)tm(dot)ee>

In response to

  • Raw size at 2005-03-10 18:07:13 from Ioannis Theoharis

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-14 07:06:14 Re: signed short fd
Previous Message Tom Lane 2005-03-14 06:52:59 Re: [BUGS] We are not following the spec for HAVING without GROUP