pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Klint Gore <kg@kgb.une.edu.au>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL stupid query plan... terrible performance !
Date: Mon, 28 Jun 2004 01:48:43 -0400
Message-ID: <18211.1088401723@sss.pgh.pa.us> (raw)
In-Reply-To: <40DFACD5345.1020KG@129.180.47.120>
References: <40DF684D.9060207@wp.pl>
	<16908.1088393386@sss.pgh.pa.us>
	<40DFACD5345.1020KG@129.180.47.120>

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



view thread (6+ messages)  latest in thread

Message-ID: <18211.1088401723@sss.pgh.pa.us>
Permalink:  ../18211.1088401723@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18211.1088401723@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kg@kgb.une.edu.au
  Subject: Re: SQL stupid query plan... terrible performance !
  In-Reply-To: <18211.1088401723@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox