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 8F0D4D7FB8 for ; Fri, 30 Sep 2005 06:16:04 -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 10725-03 for ; Fri, 30 Sep 2005 09:16:00 +0000 (GMT) Received: from ms005msg.fastwebnet.it (ms005msg.fastwebnet.it [213.140.2.50]) by svr1.postgresql.org (Postfix) with ESMTP id A222FD87EC for ; Fri, 30 Sep 2005 06:15:59 -0300 (ADT) Received: from lyra (1.17.192.122) by ms005msg.fastwebnet.it (7.2.060.2) id 43224E3900499090 for pgsql-performance@postgresql.org; Fri, 30 Sep 2005 11:16:00 +0200 Received: from localhost (lyra [127.0.0.1]) by lyra (Postfix) with ESMTP id DD5E0197368 for ; Fri, 30 Sep 2005 11:16:23 +0200 (CEST) Received: from lyra ([127.0.0.1]) by localhost (lyra [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09037-05 for ; Fri, 30 Sep 2005 11:16:22 +0200 (CEST) Received: by lyra (Postfix, from userid 1003) id 00D95197367; Fri, 30 Sep 2005 11:16:21 +0200 (CEST) Subject: Lists or external TABLE? From: xchris To: pgsql-performance@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2005 11:16:21 +0200 Message-Id: <1128071781.8112.32.camel@lyra> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 X-Virus-Scanned: by amavisd-new at lyra X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.744 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, RCVD_ILLEGAL_IP=1.37] X-Spam-Level: * X-Archive-Number: 200509/448 X-Sequence-Number: 14756 Hi list, i'm a postgres noob and before designing a new Database Schema i would like to ask you a simple question because preformance will be a critical point. My question regards performance comparison between a Table which includes a list or a Table without list and with an external table. 1 - TABLE A has several fields (most of which are types defined by me) for a total of 30-40 field (counting fields in my new types) and could contain 5000 rows. 2 - TABLE A will be accessed several times with several views or query. (many SELECT,few UPDATE) 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? I'm afraid that including those addresses will decrease performance in doing many SELECT. On the other side i'm afraid of doing JOIN with TABLE B. What do you think? Thank you! xchris