X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DDCA15292B for ; Wed, 1 Jun 2005 06:01:45 -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 13064-02 for ; Wed, 1 Jun 2005 09:01:44 +0000 (GMT) Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by svr1.postgresql.org (Postfix) with ESMTP id 6724952944 for ; Wed, 1 Jun 2005 06:01:43 -0300 (ADT) Received: from modem-2676.leopard.dialup.pol.co.uk ([217.135.154.116] helo=192.168.0.102) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.41) id 1DdP6f-0003aC-Fd; Wed, 01 Jun 2005 10:01:45 +0100 Subject: Re: very large table From: Simon Riggs To: Praveen Raja Cc: pgsql-performance@postgresql.org In-Reply-To: <022801c565c4$6b1ac8c0$541510ac@sek.se> References: <022801c565c4$6b1ac8c0$541510ac@sek.se> Content-Type: text/plain; charset=UTF-8 Organization: 2nd Quadrant Date: Wed, 01 Jun 2005 09:57:19 +0100 Message-Id: <1117616239.3844.898.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/8 X-Sequence-Number: 12646 On Tue, 2005-05-31 at 11:37 +0200, Praveen Raja wrote: > I=E2=80=99m trying to move an existing solution from MySQL to PostgreSQL.= As > it is now the solution has 4 tables where data in inserted by an > application. At regular intervals (10min) data from these tables is > consolidated and moved to another table for reporting purposes. There > exist many instances of these reporting tables and in total they are > expected to hold about 500 million rows. There are about 200 of these > reporting tables at the moment with data split among them. When a > request comes in all these tables are searched.=20 > While moving to PostgreSQL is it a good idea to move from using > multiple tables to one table for so many rows?=20 No. All of the same reasoning applies.=20 Try to keep each table small enough to fit easily in RAM. Make sure you specify WITHOUT OIDS on the main data tables. Best Regards, Simon Riggs