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 44188D1B896 for ; Thu, 20 May 2004 06:28:16 -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 58588-10 for ; Thu, 20 May 2004 06:27:57 -0300 (ADT) Received: from linda-1.paradise.net.nz (bm-1a.paradise.net.nz [202.0.58.20]) by svr1.postgresql.org (Postfix) with ESMTP id D7360D1B262 for ; Thu, 20 May 2004 06:26:28 -0300 (ADT) Received: from smtp-2.paradise.net.nz (smtp-2b.paradise.net.nz [202.0.32.211]) by linda-1.paradise.net.nz (Paradise.net.nz) with ESMTP id <0HY0005E8A80XR@linda-1.paradise.net.nz> for pgsql-performance@postgresql.org; Thu, 20 May 2004 21:26:30 +1200 (NZST) Received: from paradise.net.nz (203-79-100-70.adsl.paradise.net.nz [203.79.100.70]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id 800B59E248; Thu, 20 May 2004 21:26:24 +1200 (NZST) Date: Thu, 20 May 2004 21:28:28 +1200 From: Mark Kirkwood Subject: Re: DB Design In-reply-to: <200405190724.i4J7NuPW030497@mail.census.gov.ph> To: "Michael Ryan S. Puncia" Cc: pgsql-performance@postgresql.org Message-id: <40AC7A3C.2050001@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040404 References: <200405190724.i4J7NuPW030497@mail.census.gov.ph> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/171 X-Sequence-Number: 7002 The complete answer is probably "it depends", but this does not help much...:-) I would try out the simple approach first (i.e one 50 million row table), but read up about : i) partial indexes and maybe ii) clustering iii) think about presorting the data before loading to place "likely to be accessed" rows "close" together in the table (if possible). iv) get to know the analyze, explain, explain analyze commands.... Best wishes Mark 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 > > > > > > I will use this only for query purpose .. > > > > Thanks .. > > > > >