X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8FD1FCBED8 for ; Thu, 10 Jul 2003 07:10:38 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 53814-09 for ; Thu, 10 Jul 2003 04:10:06 -0300 (ADT) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 3FB70CB566 for ; Thu, 10 Jul 2003 04:10:04 -0300 (ADT) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h6A7CD6B019658 for ; Thu, 10 Jul 2003 12:42:13 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by smtp.pspl.co.in (8.12.9/8.12.9) with ESMTP id h6A7CCKr019645; Thu, 10 Jul 2003 12:42:12 +0530 From: "Shridhar Daithankar" To: PostgreSQL Performance , Martin Foster Date: Thu, 10 Jul 2003 12:41:16 +0530 MIME-Version: 1.0 Subject: Re: [NOVICE] Extreme high load averages Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3F0D5EEC.29862.506A9AE@localhost> In-reply-to: <3F0D0B0A.70506@ethereal-realms.org> References: <3F0D5550.21678.4E122CF@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Spam-Checker-Version: SpamAssassin 2.54 (1.174.2.17-2003-05-11-exp) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/165 X-Sequence-Number: 2458 On 10 Jul 2003 at 0:43, Martin Foster wrote: > As for creating a new table, that in itself is a nice idea. But it > would cause issues for people currently in the realm. Their posts > would essentially dissapear from site and cause more confusion then its > worth. No they won't. Say you have a base table and your current post table is child of that. You can query on base table and get rows from child table. That way all the data would always be there. While inserting posts, you would insert in child table. While qeurying you would query on base table. That way things will be optimal. > Inheritance would work, but the database would essentially just grow and > grow and grow right? Right. But there are two advantages. 1. It will always contain valid posts. No dead tuples. 2. You can work in chuncks of data. Each child table can be dealt with separately without affecting other child tables, whereas in case of a single large table, entire site is affected.. Deleting 100K posts from 101K rows table is vastly different than deleting 10K posts from 2M rows table. Later one would unnecessary starve the table with dead tuples and IO whereas in former case you can do create table as select from and drop the original.. HTH Bye Shridhar -- "[In 'Doctor' mode], I spent a good ten minutes telling Emacs what Ithought of it. (The response was, 'Perhaps you could try to be lessabusive.')"(By Matt Welsh)