Re: ]To estimate the size of db - Mailing list pgsql-admin

From Shane Ambler
Subject Re: ]To estimate the size of db
Date
Msg-id 483513EB.6080500@Sheeky.Biz
Whole thread Raw
In response to Re: ]To estimate the size of db  ("Duan Ligong" <l-duan@zd.cnes.jp.nec.com>)
List pgsql-admin
Duan Ligong wrote:
> I mean I want to estimate the size of the space which the db will occupy.
> Now there is no db.

With a bit of math and the info here -
http://www.postgresql.org/docs/8.3/interactive/storage-page-layout.html
you can start to get an idea.

Simple calculation would be 23 bytes overhead per row + length of data
in columns with one or two extra overhead on some types (like length of
string or array) also don't forget that text may be more than one byte
per char.

A similar estimate for indexes can come into play as well.

The final size will likely be a bit larger as you also get issues like
data alignment and unused space on a page that doesn't fit a row...



--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

pgsql-admin by date:

Previous
From: "Duan Ligong"
Date:
Subject: Re: ]To estimate the size of db
Next
From: Gerd Koenig
Date:
Subject: Re: ]To estimate the size of db