Re: A question about Vacuum analyze

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: Christopher Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: A question about Vacuum analyze
Date: 2006-02-27 17:48:33
Message-ID: 44033B71.5030204@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you very much for all your inputs. I believe "analyze" is the one
I should use .

>Quoth emilu(at)encs(dot)concordia(dot)ca (Emi Lu):
>
>
>>>no. the suggestion was that a VACUUM is not needed, but that an
>>>ANALYZE might be.
>>>
>>>
>>Thank you gnari for your answer. But I am a bit confused about not
>>running vacuum but only "analyze". Can I seperate these two
>>operations? I guess "vacuum analyze" do both vacuum and analyze. Or
>>"EXPLAIN ANALYZE" can do it for me?
>>
>>
>
>EXPLAIN, ANALYZE, and VACUUM are different things; ANALYZE gets used
>in two different contexts...
>
>1. VACUUM is what cleans dead tuples out of tables.
>
> e.g. VACUUM my_table;
>
>2. VACUUM ANALYZE cleans out dead tuples and recalculates data
> distributions
>
> e.g. VACUUM ANALYZE my_table;
>
>3. EXPLAIN describes query plans
>
> e.g. EXPLAIN select * from my_table;
>
>4. EXPLAIN ANALYZE compares query plan estimates to real results
>
> e.g. EXPLAIN ANALYZE select * from my_table;
>
>5. ANALYZE recalculates data distributions (as in 2, but without
> cleaning out dead tuples).
>
> e.g. ANALYZE my_table;
>
>Pointedly, EXPLAIN ANALYZE is entirely distinct from ANALYZE and
>VACUUM ANALYZE...
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message CG 2006-02-27 18:27:20 Re: ltree + gist index performance degrades significantly over a night
Previous Message Bernhard Weisshuhn 2006-02-27 17:24:40 Re: ltree + gist index performance degrades significantly over a night