pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Mark Woodward <pgsql@mohawksoft.com>
Cc: pg@mohawksoft.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Netflix Prize data
Date: Wed, 04 Oct 2006 17:46:18 -0400
Message-ID: <87lknv69g5.fsf@enterprisedb.com> (raw)
In-Reply-To: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com>
References: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com>


"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



view thread (12+ messages)  latest in thread

Message-ID: <87lknv69g5.fsf@enterprisedb.com>
Permalink:  ../87lknv69g5.fsf@enterprisedb.com/
Also on:    postgresql.org/message-id/87lknv69g5.fsf@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: stark@enterprisedb.com, pgsql@mohawksoft.com, pg@mohawksoft.com
  Subject: Re: Netflix Prize data
  In-Reply-To: <87lknv69g5.fsf@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox