Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D9D179FB264 for ; Wed, 10 Jan 2007 17:52:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 96930-03 for ; Wed, 10 Jan 2007 17:52:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by postgresql.org (Postfix) with ESMTP id 1ACD59FB267 for ; Wed, 10 Jan 2007 17:52:36 -0400 (AST) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 0836F76531; Wed, 10 Jan 2007 16:48:43 -0500 (EST) Received: from web2.messagingengine.com ([10.202.2.211]) by out1.internal (MEProxy); Wed, 10 Jan 2007 16:48:43 -0500 Received: by web2.messagingengine.com (Postfix, from userid 99) id DF4A61F819; Wed, 10 Jan 2007 16:48:42 -0500 (EST) Message-Id: <1168465722.17889.1168630713@webmail.messagingengine.com> X-Sasl-Enc: BVsDhbXb48ak/3HEmSVhXY4zkszWl2H167qk1GTJuVv9 1168465722 From: "Jeremy Haile" To: "Jim C. Nasby" , pgsql-performance@postgresql.org Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface References: <1168363601.5177.1168380907@webmail.messagingengine.com> <20070110203556.GX12217@nasby.net> <1168461780.9408.1168619515@webmail.messagingengine.com> <20070110212125.GZ12217@nasby.net> Subject: Re: High inserts, bulk deletes - autovacuum vs scheduled In-Reply-To: <20070110212125.GZ12217@nasby.net> Date: Wed, 10 Jan 2007 16:48:42 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/160 X-Sequence-Number: 22761 > BTW, that's the default values for analyze... the defaults for vacuum > are 2x that. Yeah - I was actually more concerned that tables would need to be analyzed more often than I was about vacuuming too often, so I used analyze as the example. Since my app is inserting constantly throughout the day and querying for "recent" data - I want to make sure the query planner realizes that there are lots of rows with new timestamps on them. In other words, if I run a query "select * from mytable where timestamp > '9:00am'" - I want to make sure it hasn't been a day since the table was analyzed, so the planner thinks there are zero rows greater than 9:00am today. > What's more important > is to make sure critical tables (such as queue tables) are getting > vacuumed frequently so that they stay small. Is the best way to do that usually to lower the scale factors? Is it ever a good approach to lower the scale factor to zero and just set the thresholds to a pure number of rows? (when setting it for a specific table) Thanks, Jeremy Haile