Re: Slow query even with aggressive auto analyze

From: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
To: Karolis Pocius <kpocius(at)northplains(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Slow query even with aggressive auto analyze
Date: 2013-02-10 06:52:25
Message-ID: 6C0B27F7206C9E4CA54AE035729E9C38420CD35E@szxeml558-mbs.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Friday, February 08, 2013 6:06 PM Karolis Pocius wrote:

> I've tried changing autovacuum_analyze_scale_factor as well as setting
> job_batches table to auto analyze every 500 changes (by setting scale
> factor to 0 and threshold to 500), but I still keep running into that
> issue, sometimes minutes after the table was analyzed.

> I checked pg_locks to see if anything had granted=false, but that
>doesn't seem to be the case.

> This issue is occurring on two separate instances 9.0.4 and 9.1.4 - both
> have nearly identical settings, just run on a different hardware.

> Config changes http://pgsql.privatepaste.com/8acfb9d136

> Any ideas what is going wrong here?

I think you can verify in Logs whether analyze is happening as per your expectation.
You can set log_autovacuum_min_duration = 0, so that auto_analyze can be logged everytime it happens.

With Regards,
Amit Kapila.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alexandre Riveira 2013-02-11 12:52:07 Is it correct to optimize a query with subselect in the "where"?
Previous Message Jeff Janes 2013-02-10 04:02:55 Re: postgresql.conf recommendations