X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 65DF5D921C for ; Fri, 30 Sep 2005 06:35:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13476-08 for ; Fri, 30 Sep 2005 09:35:24 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 9D89FD91EB for ; Fri, 30 Sep 2005 06:35:24 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 36FBA41496F; Fri, 30 Sep 2005 10:35:21 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 6B27515F1D; Fri, 30 Sep 2005 10:34:38 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12748-01; Fri, 30 Sep 2005 10:34:35 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 9712E15F1C; Fri, 30 Sep 2005 10:34:35 +0100 (BST) Message-ID: <433D06AB.3020409@archonet.com> Date: Fri, 30 Sep 2005 10:34:35 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: xchris Cc: pgsql-performance@postgresql.org Subject: Re: Lists or external TABLE? References: <1128071781.8112.32.camel@lyra> In-Reply-To: <1128071781.8112.32.camel@lyra> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.058 required=5 tests=[AWL=0.008, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/449 X-Sequence-Number: 14757 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