pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Keith Gray <keith@heart.com.au>
Cc: Masaru Sugawara <rk73@sea.plala.or.jp>
Cc: Alvar Freude <alvar@a-blast.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: 2 Selects 1 is faster, why?
Date: Thu, 27 Jun 2002 23:52:40 -0400
Message-ID: <2367.1025236360@sss.pgh.pa.us> (raw)
In-Reply-To: <3D1BA27E.9000802@heart.com.au>
References: <afag3c$kce$1@news.hub.org>
	<1371510000.1025105687@gnarzelwicht.delirium-arts.de>
	<20020627234531.7ECB.RK73@sea.plala.or.jp>
	<3D1BA27E.9000802@heart.com.au>

Keith Gray <keith@heart.com.au> writes:
> ...but is it true that if you place the filter clause first,
> the join will not have to complete the whole table?

PG's planner does not pay attention to the ordering of WHERE clauses;
it will do what it thinks best with them in any case.

			regards, tom lane





view thread (5+ messages)

Message-ID: <2367.1025236360@sss.pgh.pa.us>
Permalink:  ../2367.1025236360@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2367.1025236360@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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, keith@heart.com.au, rk73@sea.plala.or.jp, alvar@a-blast.org
  Subject: Re: 2 Selects 1 is faster, why?
  In-Reply-To: <2367.1025236360@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