Re: SQL stupid query plan... terrible performance ! - Mailing list pgsql-performance

From Tom Lane
Subject Re: SQL stupid query plan... terrible performance !
Date
Msg-id 18211.1088401723@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL stupid query plan... terrible performance !  (Klint Gore <kg@kgb.une.edu.au>)
Responses Re: SQL stupid query plan... terrible performance !
List pgsql-performance
Klint Gore <kg@kgb.une.edu.au> writes:
> On Sun, 27 Jun 2004 23:29:46 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> [yawn...]  Cast the constants to bigint.  See previous discussions.

> Would there be any way of adding some sort of indicator to the plan as
> to why sequential was chosen?

Not really ... the plan that's presented is the one that looked the
cheapest out of the feasible plans.  How are you going to identify a
single reason as to why any other plan was not generated or lost out
on a cost-estimate basis?  Humans might be able to do so (note that
the above quote is an off-the-cuff estimate, not something I'd care
to defend rigorously) but I don't think software can do it.

FWIW, the particular problem here should be fixed in 7.5.

            regards, tom lane

pgsql-performance by date:

Previous
From: Klint Gore
Date:
Subject: Re: SQL stupid query plan... terrible performance !
Next
From: Richard Huxton
Date:
Subject: Re: Query performance