Re: Why are tables sizes so big? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Why are tables sizes so big?
Date
Msg-id 3AA5E240.FD449F78@archonet.com
Whole thread Raw
In response to Why are tables sizes so big?  (God_Of_Pain <silicontao_roy@technologist.com>)
Responses Re: Why are tables sizes so big?
List pgsql-general
God_Of_Pain wrote:
>
> I have a Win32 app connecting to a PostgreSQL server via Delphi -> BDE ->
> ODBC -> PostgreSQL. The app takes CSV files and stores them on the
> PostgreSQL server. An empty CSV file makes a table that is 8kB in size on
> the server and that is fine but for every 1kB of text in the CSV file the
> PostgreSQL file gains about 5kB.
>
> The CSV file has 5 text fields that I change to char size 10, float, float,
> int and float. That in it's self sould make the data on the server much
> smaller, but it is not, it is bigger, why?

char  = 10 + 4
floats= 8 * 3
int   = 4
oid   = 4

That's at least 46 bytes per row plus indexes - which can take up a lot.
Does that look plausible?

 - Richard Huxton

pgsql-general by date:

Previous
From: will trillich
Date:
Subject: need general optimization advice
Next
From: Karel Zak
Date:
Subject: Re: [SQL] Re: Re: MySQLs Describe emulator!