X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D1EAA9FA5BA for ; Thu, 15 Jun 2006 10:12:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94650-10 for ; Thu, 15 Jun 2006 10:12:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 0C88F9F9CAA for ; Thu, 15 Jun 2006 10:11:59 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k5FDBqn4045561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 15 Jun 2006 07:11:55 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.6/8.13.6) with ESMTP id k5FDBqlY004012; Thu, 15 Jun 2006 07:11:52 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.6/8.13.6/Submit) id k5FDBqGS004011; Thu, 15 Jun 2006 07:11:52 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 15 Jun 2006 07:11:51 -0600 From: Michael Fuhr To: Praveen Kumar N Cc: pgsql-admin@postgresql.org Subject: Re: database physical storage Message-ID: <20060615131151.GA3925@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/127 X-Sequence-Number: 22089 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