From: Lewis Kapell <lkapell@setonhome.org>
To: pgsql-admin@postgresql.org
Subject: Re: Clarification required: autovacuum and VACUUM command mode
Date: Fri, 14 May 2010 11:24:54 -0400
Message-ID: <4BED6B46.2090109@setonhome.org> (raw)
In-Reply-To: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D68@ZMY16EXM66.ds.mot.com>
References: <58FEF525AF1E664D9503ACDEAC926BBC03BE7D68@ZMY16EXM66.ds.mot.com>
Yes, the query planner is part of Postgres itself. Here are some pages
of the manual that talk about the planner and how it works:
http://www.postgresql.org/docs/8.3/static/using-explain.htmlhttp://www.postgresql.org/docs/8.3/static/planner-stats.html
And this talks about configuration options to control (or at least
influence) what the planner does:
http://www.postgresql.org/docs/8.3/static/runtime-config-query.html
- Lewis
On 5/14/2010 11:17 AM, Narasimha Murthy-VRFX87 wrote:
> Hi Lewis,
>
> Thanks for the clarification.
>
> Referring to the statement in postgresql-8.2-US.pdf document "ANALYZE
> collects statistics about the contents of tables in the database ...
> query planner uses these statistics to help determine the most efficient
> execution plans for queries."
>
> From your response, I now understood that "Query planner" is part of
> PostgreSQL DB.
>
> Regards, Narasimha Murthy
> Cell +91 95814 98895, +91-94940 62794 | 040-2347 2025 (O) | x2025 (O)
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Lewis Kapell
> Sent: Friday, May 14, 2010 8:34 PM
> To: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Clarification required: autovacuum and VACUUM
> command mode
>
> 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"<VRFX87@motorola.com> 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
>>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: lkapell@setonhome.org
Subject: Re: Clarification required: autovacuum and VACUUM command mode
In-Reply-To: <4BED6B46.2090109@setonhome.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox