X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id 81650CC23E for ; Fri, 11 Jul 2003 19:44:06 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 18636-09 for ; Fri, 11 Jul 2003 19:43:47 +0000 (GMT) Received: from ethereal-realms.org (thebe.ethereal-realms.org [142.179.222.205]) by svr1.postgresql.org (Postfix) with ESMTP id 6A0EFDC7A4 for ; Fri, 11 Jul 2003 03:09:31 -0300 (ADT) Received: from ethereal-realms.org (ip14.ethereal-realms.COM [192.168.1.14]) by ethereal-realms.org (8.12.6/8.12.6) with ESMTP id h6B69cUc029383; Fri, 11 Jul 2003 00:09:39 -0600 (MDT) Message-ID: <3F0E54A2.4040604@ethereal-realms.org> Date: Fri, 11 Jul 2003 00:09:38 -0600 From: Martin Foster Organization: Ethereal Realms User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Shridhar Daithankar" , PostgreSQL Performance Subject: Re: [NOVICE] Extreme high load averages References: <3F0D5550.21678.4E122CF@localhost> <3F0D5EEC.29862.506A9AE@localhost> In-Reply-To: <3F0D5EEC.29862.506A9AE@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/180 X-Sequence-Number: 2473 Shridhar Daithankar wrote: > 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) > When I ran EXPLAIN on the views and queries making use of the inherited tables, I noticed that everything worked based on sequence scans and it avoided all indexes. While making use of ONLY kicked in full indexes. This is even after having created a child table with the same indexes as the parent. Is this a known issue, or just some sort of oddity on my setup? Tables still cannot be removed easily, but I found a way to work around it for a day-to-day basis. Essentailly I just clean out the tables containing old rows and delete them later. However based on the above, I doubt performance would get any better. Thanks for the advice however! Martin Foster Creator/Designer Ethereal Realms martin@ethereal-realms.org