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 4961430ED64 for ; Mon, 16 Jun 2003 07:23:02 +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 59361-07 for ; Mon, 16 Jun 2003 04:22:51 -0300 (ADT) Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 21D9530EC62 for ; Mon, 16 Jun 2003 04:22:50 -0300 (ADT) Received: (from root@localhost) by www.pspl.co.in (8.11.6/8.11.6) id h5G7MnU02144 for ; Mon, 16 Jun 2003 12:52:49 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id h5G7Mm902139 for ; Mon, 16 Jun 2003 12:52:49 +0530 From: "Shridhar Daithankar" To: pgsql-performance@postgresql.org Date: Mon, 16 Jun 2003 12:52:00 +0530 MIME-Version: 1.0 Subject: Re: any way to use indexscan to get last X values Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3EEDBD70.15023.3CCA80F@localhost> In-reply-to: <5.2.1.1.0.20030616090124.02a85678@127.0.0.1> References: <3EEDADF0.29611.3901BC1@localhost> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Archive-Number: 200306/83 X-Sequence-Number: 2167 On 16 Jun 2003 at 9:08, Tomaz Borstnar wrote: > So this really means major increase of performance for real situation - > forum with over 85 000 messages where you get rid of full scan and 2 full > sorts to display list of msgs which happens a lot. You can always use some > query/page caching things, but then people start to post duplicates, > because they think the message did not make it into the database. OTOH, I was thinking of your original problem. If you could have two identical tables, one to store incoming posts and other to store approved posts, that should be lot more simpler. Of course you need to vacuum much more if you are deleting from in queue but the kind of database you are handling, me need not tell you about vacuum.. Just a though.. Bye Shridhar -- Drew's Law of Highway Biology: The first bug to hit a clean windshield lands directly in front of your eyes.