Re: SQL stupid query plan... terrible performance !

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: SQL stupid query plan... terrible performance !
Date: 2004-06-28 05:48:43
Message-ID: 18211.1088401723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au> writes:
> On Sun, 27 Jun 2004 23:29:46 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2004-06-28 09:14:11 Re: Query performance
Previous Message Klint Gore 2004-06-28 05:29:57 Re: SQL stupid query plan... terrible performance !