Thread: Re: Different execution plan

Re: Different execution plan

From
"Sabin Coanda"
Date:
Hi there,

I am still concerned about this problem, because there is a big differences
between the two cases, and I don't know how to identify the problem. Can
anybody help me, please ?

TIA,
Sabin



Re: Different execution plan

From
"Scott Marlowe"
Date:
On Mon, Sep 22, 2008 at 2:40 PM, Sabin Coanda
<sabin.coanda@deuromedia.ro> wrote:
> Hi there,
>
> I am still concerned about this problem, because there is a big differences
> between the two cases, and I don't know how to identify the problem. Can
> anybody help me, please ?

Sure, first step, if you can provide the following:

pg version
os and version
output of explain analyze of each query (one good query, one bad)

In the meantime, make sure you've vacuum analyzed your db.

Re: Different execution plan

From
"Sabin Coanda"
Date:
Hi Scott,

I think it would be nice to log the reasons why an explain analyze chooses a
specific way or another for an execution plan. This would avoid wasting time
to find the source of these decisions from the existing logs.

Is it possible ?

TIA,
Sabin



Re: Different execution plan

From
"Sabin Coanda"
Date:
I use postgresql-8.2-506.jdbc3.jar, maybe helps

Sabin



Re: Different execution plan

From
Matthew Wakeling
Date:
On Wed, 24 Sep 2008, Sabin Coanda wrote:
> I think it would be nice to log the reasons why an explain analyze chooses a
> specific way or another for an execution plan. This would avoid wasting time
> to find the source of these decisions from the existing logs.

That would probably fill up the logs pretty quickly.

What may be really useful would be some sort of "extended explain" option.
At the moment, explain prints out the best query plan found. Sometimes it
would be nice if it printed out all the plans it considered, so we don't
have to go fiddling with enable_xxx to find alternatives.

Matthew

--
I suppose some of you have done a Continuous Maths course. Yes? Continuous
Maths? <menacing stares from audience> Whoah, it was like that, was it!
                                        -- Computer Science Lecturer