pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: xchris <lyralyra@fastmail.fm>
Cc: pgsql-performance@postgresql.org
Subject: Re: Lists or external TABLE?
Date: Fri, 30 Sep 2005 10:34:35 +0100
Message-ID: <433D06AB.3020409@archonet.com> (raw)
In-Reply-To: <1128071781.8112.32.camel@lyra>
References: <1128071781.8112.32.camel@lyra>

xchris wrote:
> 
> Let's suppose i need to add an info about addresses (which includes
> country,city,cap....etc etc).
> Addresses can vary from 1 to 20 entries..
> 
> Talking about performance is it better to include a list of addresses in
> TABLE A or is it better to create an external TABLE B?

Don't optimise before you have to.

Do the addresses belong in "A"? If so, put them there. On the other 
hand, if you want items in "A" to have more than one address, or to 
share addresses then clearly you will want a separate address table. 
It's difficult to say more without a clear example of your requirements.

Even if you choose to alter your design for performance reasons, you 
should make sure you run tests with realistic workloads and hardware. 
But first, trust PG to do its job and design your database according to 
the problem requirements.

--
   Richard Huxton
   Archonet Ltd



view thread (3+ messages)  latest in thread

Message-ID: <433D06AB.3020409@archonet.com>
Permalink:  ../433D06AB.3020409@archonet.com/
Also on:    postgresql.org/message-id/433D06AB.3020409@archonet.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: dev@archonet.com, lyralyra@fastmail.fm
  Subject: Re: Lists or external TABLE?
  In-Reply-To: <433D06AB.3020409@archonet.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