From: | gonzales(at)linuxlouis(dot)net |
---|---|
To: | Umamaheswaran Srinivasan <umas25(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: HardDisk space |
Date: | 2006-07-12 14:52:33 |
Message-ID: | Pine.LNX.4.64.0607121050450.10257@mx1.linuxlouis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You should use varchar(20), which will not consume as much space as
char(20) IF the values inserted don't, themselves take the full 20
positions. In varchar, there will be no padding, thus saving on your disk
space.
For your question in particular, that depends on the block size of how PG
allocates space on tables.
On Wed, 12 Jul 2006, Umamaheswaran Srinivasan wrote:
> I w'd like how the DB growth impacts the actual disk
> space. For example, I have a table with one textfield,
> char(20) and I insert 1000000 records. My DB size w'd
> be approximately,
> 20+28(Overhead)=48*1000000=48MB. What is the actual
> effect on the physical HDD. I w'd appreciate your
> help.
> Thanks,
> Uma
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--
Louis Gonzales
louis(dot)gonzales(at)linuxlouis(dot)net
http://www.linuxlouis.net
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Burdairon | 2006-07-12 14:53:46 | Re: Dynamic table with variable number of columns |
Previous Message | David Fetter | 2006-07-12 14:48:41 | Re: doesn't recognize "!=-" (not equal to a negative value) |