pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: theo@flame.co.za
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizer : query rewrite and execution plan ?
Date: Mon, 11 Feb 2008 11:44:42 -0500
Message-ID: <2685.1202748282@sss.pgh.pa.us> (raw)
In-Reply-To: <1202723087.4247.150.camel@ebony.site>
References: <60F4687513E90748AE8933DEA5D054E79ACBDE@SLAM0018.match-supermarket.com>
	<1202298826.4252.972.camel@ebony.site>
	<1202299962.4274.22.camel@localhost6.localdomain6>
	<9924.1202313626@sss.pgh.pa.us>
	<1202723087.4247.150.camel@ebony.site>

Simon Riggs <simon@2ndquadrant.com> writes:
> Say if cost of best plan >= N then recheck query for strangeness. If
> anything found, re-plan query.

Whatever makes you think that would be useful?

The usual result of undetected duplicate WHERE clauses is an
*underestimate* of runtime, not an overestimate (because it thinks
too few tuples will be selected).

			regards, tom lane



view thread (12+ messages)

Message-ID: <2685.1202748282@sss.pgh.pa.us>
Permalink:  ../2685.1202748282@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2685.1202748282@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, simon@2ndquadrant.com, theo@flame.co.za
  Subject: Re: Optimizer : query rewrite and execution plan ?
  In-Reply-To: <2685.1202748282@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