Re: Netflix Prize data

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
Cc: pg(at)mohawksoft(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Netflix Prize data
Date: 2006-10-04 21:46:18
Message-ID: 87lknv69g5.fsf@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Mark Woodward" <pgsql(at)mohawksoft(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2006-10-04 21:54:21 Re: PL/pgSQL Todo, better information in errcontext from plpgsql
Previous Message Bruce Momjian 2006-10-04 21:19:28 Re: SQL:2003 Statistical functions - What are they?