Skip site navigation (1) Skip section navigation (2)

Re: Physical column size

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: Paul Mackay <mackaypaul(at)gmail(dot)com>
Subject: Re: Physical column size
Date: 2006-01-26 11:22:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-performancepgsql-sql
Am Donnerstag, 26. Januar 2006 11:06 schrieb Paul Mackay:
> Hi,
> I've created a table like this :
> c "char",
> i int4
> );
> And another one
> i int4,
> ii int4
> );
> I then inerted a bit more than 19 million rows in each table (exactly the
> same number of rows in each).
> The end result is that the physical size on disk used by table tmp_A is
> exactly the same as table tmp_B (as revealed by the pg_relation_size
> function) ! Given that a "char" field is supposed to be 1 byte in size and
> a int4 4 bytes, shouldn't the tmp_A use a smaller disk space ? Or is it
> that any value, whatever the type, requires at least 4 bytes to be stored ?

I think this is caused by alignment.

In response to

pgsql-performance by date

Next:From: Jignesh K. ShahDate: 2006-01-26 14:56:14
Subject: Re: PostgreSQL Solaris packages now in beta
Previous:From: Paul MackayDate: 2006-01-26 10:06:24
Subject: Physical column size

pgsql-sql by date

Next:From: Peter EisentrautDate: 2006-01-26 11:22:34
Subject: Re: filtering after join
Previous:From: andrewDate: 2006-01-26 10:54:03
Subject: Re: filtering after join

pgsql-general by date

Next:From: Richard HuxtonDate: 2006-01-26 11:26:36
Subject: Re: many row updates
Previous:From: UroŇ° GruberDate: 2006-01-26 11:15:58
Subject: many row updates

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group