Re: Netflix Prize data - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Netflix Prize data
Date
Msg-id 87lknv69g5.fsf@enterprisedb.com
Whole thread Raw
In response to Netflix Prize data  ("Mark Woodward" <pgsql@mohawksoft.com>)
List pgsql-hackers
"Mark Woodward" <pgsql@mohawksoft.com> writes:

> I'm using 8.1.4. The "rdate" field looks something like: "2005-09-06" So,
> the raw data is 23 bytes, the date string will probably be rounded up to
> 12 bytes, that's 24 bytes per row of data. What is the overhead per
> variable? per row?
>
> Is there any advantage to using "varchar(10)" over "text" ?

I'll second the "use a date" comment.

But to answer the questions, text and varchar are handled identically in
almost every respect. The overhead per variable width field (like text or
varchar) is 4 bytes. The overhead per row depends on a few factors, but figure
28 bytes.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SQL:2003 Statistical functions - What are they?
Next
From: "Pavel Stehule"
Date:
Subject: Re: PL/pgSQL Todo, better information in errcontext from plpgsql