From: | "Micha Mosiewicz" <mimo(at)lodz(dot)pdi(dot)net> |
---|---|
To: | Shiby Thomas <sthomas(at)cise(dot)ufl(dot)edu> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] database size |
Date: | 1998-01-06 23:37:43 |
Message-ID: | 34B2C047.59660157@lodz.pdi.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Shiby Thomas wrote:
>
> Hi,
>
> I created a table with two columns of type int, and loaded about 300 K records
> in it. So, the total size of the table is approx. that of 600 K integers,
> roughly 2.4 MB.
> But, the file corresponding to the table in pgsql/data/base directory
> has a size of 19 MB. I was wondering if I have done something wrong in
> the installation or usage, or is it the normal behavior ?
This is OK. First thing - int is not 2 bytes long, it's 4 bytes long.
Use int2 if you want so. Second - you have to add up other per-record
stuff like oids and other internal attributes.
> Also, I was trying to execute the query:
> select item as item, count(*) as cnt into table C_temp
> from temp group by item;
>
> Here, temp is the name of the table which contains the data and item is an
> integer attribute. While doing the sort for the group by, the size of one of
> the temporary pg_psort relation grows to about 314 MB. The size of the temp
> table is as mentioned above.
It ain't good. Seems like the psort is very hungry.
Mike
--
WWW: http://www.lodz.pdi.net/~mimo tel: Int. Acc. Code + 48 42 148340
add: Michal Mosiewicz * Bugaj 66 m.54 * 95-200 Pabianice * POLAND
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-01-06 23:42:18 | Re: [HACKERS] database size |
Previous Message | Darren King | 1998-01-06 23:26:31 | Re: [HACKERS] database size |