Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B065B632910 for ; Fri, 14 May 2010 12:04:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 30149-01 for ; Fri, 14 May 2010 15:04:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from jonah.setonhome.org (mail.setonhome.org [76.3.225.43]) by mail.postgresql.org (Postfix) with ESMTP id 7582D6323A7 for ; Fri, 14 May 2010 12:04:19 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by jonah.setonhome.org (Postfix) with ESMTP id 9D537137C017 for ; Fri, 14 May 2010 11:04:27 -0400 (EDT) Received: from jonah.setonhome.org ([127.0.0.1]) by localhost (jonah.home.setonhome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G7Ov6rIetC-V; Fri, 14 May 2010 11:04:25 -0400 (EDT) Received: from [127.0.0.1] (unknown [76.3.225.44]) by jonah.setonhome.org (Postfix) with ESMTP id 9F500137C00B for ; Fri, 14 May 2010 11:04:25 -0400 (EDT) Message-ID: <4BED666D.6020106@setonhome.org> Date: Fri, 14 May 2010 11:04:13 -0400 From: Lewis Kapell Organization: Seton Home Study School User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Clarification required: autovacuum and VACUUM command mode References: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D67@ZMY16EXM66.ds.mot.com> In-Reply-To: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D67@ZMY16EXM66.ds.mot.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/157 X-Sequence-Number: 34630 You misunderstand the purpose of ANALYZE. Postgres needs the results in order to perform queries efficiently. Whether you have the ability to change or tune the queries is beside the point. - Lewis On 5/14/2010 11:01 AM, Narasimha Murthy-VRFX87 wrote: > Hi Kevin, > > Thanks again for a quick response. > > I am using a 3rd party application, which in turn using PostgreSQL DB. I > can not change/tune the SQL queries, performed by the 3rd party > application. Hence, the statistics generated by ANALYZE, is of no use to > me. That is the reason, I have planned not to run ANALYZE. > > Regards, Narasimha Murthy > Cell +91 95814 98895, +91-94940 62794 | 040-2347 2025 (O) | x2025 (O) > > -----Original Message----- > From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov] > Sent: Friday, May 14, 2010 8:18 PM > To: Narasimha Murthy-VRFX87 > Cc: pgsql-admin@postgresql.org > Subject: RE: [ADMIN] Clarification required: autovacuum and VACUUM > command mode > > "Narasimha Murthy-VRFX87" wrote: > >> Another query: I do not want to run Analyze. However, auto-vacuum runs > >> both both VACUUM and ANALYZE. I do not see any option to disable >> running ANALYZE during auto-vacuum. Is there any way to achive this? > > Usually it's best to run ANALYZE more often than VACUUM, since the > statistics generated by ANALYZE are used to choose the most efficient > plan, and ANALYZE runs faster because it just takes a random sample of > rows. Out-of-date statistics are one of the most common causes of slow > queries. That's not to say there couldn't be some very unusual > circumstances under which it might make sense to disable ANALYZE, but > I'm highly skeptical. > > Anyway, if you *really* want to shoot that fly off the end of your toe > (to stretch a metaphor), you could adjust the autovacuum settings > related to analyze to really high values. > > -Kevin >