pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: Jon Stewart <jonathan.l.stewart@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Creating large database of MD5 hash values
Date: Fri, 11 Apr 2008 15:11:34 +1000
Message-ID: <47FEF306.5090502@gmail.com> (raw)
In-Reply-To: <c0787d8a0804100748l51b63c7fx34db59e33f13c208@mail.gmail.com>
References: <c0787d8a0804100748l51b63c7fx34db59e33f13c208@mail.gmail.com>



> 1. Which datatype should I use to represent the hash value? UUIDs are
> also 16 bytes...

md5's are always 32 characters long so probably varchar(32).

> 2. Does it make sense to denormalize the hash set relationships?

The general rule is normalize as much as possible then only denormalize 
when absolutely necessary.

> 3. Should I index?

What sort of queries are you going to be running?

> 4. What other data structure options would it make sense for me to choose?

What sort of other data will you be needing to store?

-- 
Postgresql & php tutorials
http://www.designmagick.com/



view thread (9+ messages)  latest in thread

Message-ID: <47FEF306.5090502@gmail.com>
Permalink:  ../47FEF306.5090502@gmail.com/
Also on:    postgresql.org/message-id/47FEF306.5090502@gmail.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-performance@postgresql.org
  Cc: dmagick@gmail.com, jonathan.l.stewart@gmail.com
  Subject: Re: Creating large database of MD5 hash values
  In-Reply-To: <47FEF306.5090502@gmail.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