X-Original-To: pgsql-bugs@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id BBBAB9260FC for ; Sun, 1 Jun 2003 03:20:09 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 48119-01 for ; Sun, 1 Jun 2003 03:19:58 -0400 (EDT) Received: from mail.quantium.net (b.ns.quantium.net [67.96.140.30]) by developer.postgresql.org (Postfix) with SMTP id 4989F9260C0 for ; Sun, 1 Jun 2003 03:19:57 -0400 (EDT) Received: (qmail 27386 invoked from network); 1 Jun 2003 07:19:50 -0000 Received: from 15-pool1.ras10.coden-le3.alerondial.net (HELO dave.to) (206.149.128.15) by quantium.net with SMTP; 1 Jun 2003 07:19:50 -0000 Message-ID: <3ED9A923.90500@dave.to> Date: Sun, 01 Jun 2003 01:20:03 -0600 From: Dave E Martin XXIII User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: Index speeds up one row table (why)? References: <3ED93338.80806@dave.to> <1054434573.11968.42.camel@jester> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200306/6 X-Sequence-Number: 6101 Rod Taylor wrote: >An 8 k page will hold approx 140 tuples based on your structure. So, >for every ~100 updates you'll want to run vacuum (regular, not full) on >the table Alas, for this application, that means a vacuum once every 5 seconds or so. I'll see if I can set up a separate little task to do that (I assume at this rate, its better to just keep a connection open, than setup/teardown). I don't suppose there is a way to get a trigger to do a vacuum (which doesn't want to be in a transaction) (thinking it could check for id mod 100=0 or something)? I also assume a few pages isn't going to be that bad (just don't let it get to 11000 8).