Re: Any better plan for this query?..

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri <dimitrik(dot)fr(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Any better plan for this query?..
Date: 2009-05-11 19:03:28
Message-ID: 1242068608.3843.161.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On Mon, 2009-05-11 at 11:23 -0400, Tom Lane wrote:
> Dimitri <dimitrik(dot)fr(at)gmail(dot)com> writes:
> > Anyone may explain me why analyze target may have so huge negative
> > secondary effect?..
>
> If these are simple queries, maybe what you're looking at is the
> increase in planning time caused by having to process 10x as much
> statistical data. Cranking statistics_target to the max just because
> you can is not necessarily a good strategy.

statistics_target effects tables, so we have problems if you have a mix
of simple and complex queries. IMHO we need an explicit planner_effort
control, rather than the more arcane *_limit knobs which are effectively
the same thing, just harder to use in practice.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Aidan Van Dyk 2009-05-11 19:46:15 Re: Any better plan for this query?..
Previous Message Simon Riggs 2009-05-11 18:26:54 Re: Any better plan for this query?..