Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 72D6C9FBB2A for ; Mon, 14 May 2007 21:20:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45244-09 for ; Mon, 14 May 2007 21:20:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 04CD79FBB62 for ; Mon, 14 May 2007 21:20:52 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4F0Knum001624; Mon, 14 May 2007 20:20:49 -0400 (EDT) To: "Y Sidhu" cc: "Bill Moran" , pgsql-performance@postgresql.org Subject: Re: pg_stats how-to? In-reply-to: References: <4647B0A9.7080304@gmail.com> <20070514162610.GO69517@nasby.net> <20070514174558.GS69517@decibel.org> <20070514183615.GW69517@nasby.net> <20070514190748.GY69517@nasby.net> <20070514170959.a951eefc.wmoran@collaborativefusion.com> Comments: In-reply-to "Y Sidhu" message dated "Mon, 14 May 2007 15:15:49 -0700" Date: Mon, 14 May 2007 20:20:49 -0400 Message-ID: <1623.1179188449@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/261 X-Sequence-Number: 24651 "Y Sidhu" writes: > it may be table fragmentation. What kind of tables? We have 2 of them which > experience lots of adds and deletes only. No updates. So a typical day > experiences record adds a few dozen times on the order of 2.5 million. And > deletes once daily. Each of these tables has about 3 btree indexes. With an arrangement like that you should vacuum once daily, shortly after the deletes --- there's really no point in doing it on any other schedule. Note "shortly" not "immediately" --- you want to be sure that any transactions old enough to see the deleted rows have ended. regards, tom lane