From: Michael Fuhr <mike@fuhr.org>
To: Praveen Kumar N <praveen_n@students.iiit.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: database physical storage
Date: Thu, 15 Jun 2006 07:11:51 -0600
Message-ID: <20060615131151.GA3925@winnie.fuhr.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0606151016070.15974@students.iiit.net>
References: <Pine.LNX.4.61.0606151016070.15974@students.iiit.net>
On Thu, Jun 15, 2006 at 10:26:59AM +0530, Praveen Kumar N wrote:
> I have observed that the size of data (for example size of
> table in a database) stored by database system on physical storage is
> more than actual datasize.It seems database is storing data in some
> format.For example i have created a table with data 15MB considering each
> INTEGER of 4bytes.But after loading this data into database i have
> observed that database system is storing this table in 45MB memory.So can
> anybody tell me what is the reason to use so much memory? Is there any
> relation between actual dataset size and size of data stored on physical
> storage system.
Each row has storage overhead such as values that determine which
transactions can see the row. If rows have only a small amount of
data then the overhead is a large proportion of the storage space.
If a table has indexes then there's even more overhead. For more
information see the "Database Physical Storage" chapter in the
documentation, in particular the "Database Page Layout" section:
http://www.postgresql.org/docs/8.1/interactive/storage-page-layout.html
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mike@fuhr.org, praveen_n@students.iiit.net
Subject: Re: database physical storage
In-Reply-To: <20060615131151.GA3925@winnie.fuhr.org>
References: <Pine.LNX.4.61.0606151016070.15974@students.iiit.net> <20060615131151.GA3925@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox