X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CEC34D1B1DA for ; Wed, 19 May 2004 08:22:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65922-03 for ; Wed, 19 May 2004 08:22:10 -0300 (ADT) Received: from lamb.mcmillan.net.nz (218-101-14-65.paradise.net.nz [218.101.14.65]) by svr1.postgresql.org (Postfix) with ESMTP id 2D56CD1B1C7 for ; Wed, 19 May 2004 08:22:03 -0300 (ADT) Received: from lamb.mcmillan.net.nz (lamb.mcmillan.net.nz [127.0.0.1]) by lamb.mcmillan.net.nz (Postfix) with ESMTP id AB527AD98585; Wed, 19 May 2004 23:21:22 +1200 (NZST) Subject: Re: DB Design From: Andrew McMillan To: "Michael Ryan S. Puncia" Cc: pgsql-performance@postgresql.org In-Reply-To: <200405190724.i4J7NuPW030497@mail.census.gov.ph> References: <200405190724.i4J7NuPW030497@mail.census.gov.ph> Content-Type: text/plain Message-Id: <1084965682.10589.52.camel@lamb.mcmillan.net.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.7 Date: Wed, 19 May 2004 23:21:22 +1200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/153 X-Sequence-Number: 6984 On Wed, 2004-05-19 at 15:37 +0800, Michael Ryan S. Puncia wrote: > Hi Guys, > > > > My question is .. which is better design > > > > 1. Single Table with 50 million records or > 2. Multiple Table using inheritance to the parents table It's not that simple. Given your e-mail address I assume you want to store Philippines Census data in such a table, but does Census data fit well in a single flat table structure? Not from what I have seen here in NZ, but perhaps Census is simpler there. So to know what the best answer to that question is, people here will surely need more and better information from you about database schema, record size, indexing and query characteristics, and so on. > I will use this only for query purpose .. Then you may quite possibly want to consider a different database. Particularly if it is single-user query purposes. For example, there are some SQL databases that would load the entire database into RAM from static files, and then allow query against this. This can obviously give huge performance improvements in situations where volatility is not a problem. Cheers, Andrew. ------------------------------------------------------------------------- Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Do not overtax your powers. -------------------------------------------------------------------------