Skip site navigation (1) Skip section navigation (2)

Re: Lists or external TABLE?

From: Richard Huxton <dev(at)archonet(dot)com>
To: xchris <lyralyra(at)fastmail(dot)fm>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Lists or external TABLE?
Date: 2005-09-30 09:34:35
Message-ID: 433D06AB.3020409@archonet.com (view raw or flat)
Thread:
Lists: pgsql-performance
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

In response to

Responses

pgsql-performance by date

Next:From: Josh BerkusDate: 2005-09-30 17:23:30
Subject: Re: [PERFORM] A Better External Sort?
Previous:From: xchrisDate: 2005-09-30 09:16:21
Subject: Lists or external TABLE?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group