Re: Auto-analyse on insert operations

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Bertrand Roos <bertrand(dot)roos(at)areal(dot)fr>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Auto-analyse on insert operations
Date: 2015-11-04 14:44:30
Message-ID: 563A19CE.5070803@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/04/2015 06:35 AM, Bertrand Roos wrote:
> Le 04/11/2015 14:45, Adrian Klaver a écrit :
>> On 11/04/2015 05:32 AM, Bertrand Roos wrote:
>>> Hello,
>>>
>>> I try to configure auto-analyse task with postgresql 9.4.
>>> I have the following configuration (default configuration):
>>> track_counts = on
>>> autovacuum = on
>>> log_autovacuum_min_duration = -1
>>> autovacuum_max_workers = 3
>>> autovacuum_naptime = 300s
>>> autovacuum_vacuum_threshold = 50
>>> autovacuum_analyze_threshold = 50
>>> autovacuum_vacuum_scale_factor = 0.2
>>> autovacuum_analyze_scale_factor = 0.2
>>> autovacuum_freeze_max_age = 200000000
>>> autovacuum_multixact_freeze_max_age = 400000000
>>> autovacuum_vacuum_cost_delay = 20ms
>>> autovacuum_vacuum_cost_limit = -1
>>>
>>> With this configuration, I can observe that some tables are
>>> auto-analysed, but some others are not. Even if there are millions of
>>> insert operations on an empty table (all tables are in cluster mode).
>>> In fact it seems that tables with update operations are the only ones
>>> that are auto-analysed.
>>> I'm quite suprised because the documentation says that daemon check the
>>> count of insert, update and delete operations.
>>> What could it be the reason ? Why tables which have only update
>>> operation, aren't analysed ?
>>> Are update operations really taken into account ?
>>
>> Somewhere you switched actions. You start by saying updated tables are
>> being analyzed and end by saying they are not, or are the last
>> sentences supposed to refer to inserts?
>>
>>>
>>> Thanks,
>>>
>>> Bertrand
>>>
>>>
>>>
>>
>>
> Yes the last sentences referred to inserts.
> To make it clear, tables with all kinds of operations are auto-analysed.
> Table with only insert operations are never auto-analysed.

How are you determining this?

>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-11-04 14:46:46 Re: MinGW-W64 compile error
Previous Message Bertrand Roos 2015-11-04 14:35:49 Re: Auto-analyse on insert operations