Re: slow queries after ANALYZE

From: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
To: dwinner-lists(at)att(dot)net
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: slow queries after ANALYZE
Date: 2005-11-12 09:14:49
Message-ID: 9e4684ce0511120114m32254efen2faa6563146db202@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 11/11/05, DW <dwinner-lists(at)att(dot)net> wrote:
>
> I'm perplexed. I'm trying to find out why some queries are taking a long
> time, and have found that after running analyze, one particular query
> becomes slow.
>

i have had exactly the same problem very recently.
what helped? increasing statistics on come column.
which ones?
make:
explain analyze <your select>;
and check in which situations you gget the biggest change of "estiamted
rows" and "actual rows".
then check what this particular part of your statement is touching, and
increase appropriate statistics.

depesz

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Yves Vindevogel 2005-11-12 14:18:09 IO Error
Previous Message Tom Lane 2005-11-11 23:02:11 Re: 8.x index insert performance