Re: 2 Selects 1 is faster, why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keith Gray <keith(at)heart(dot)com(dot)au>
Cc: Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp>, Alvar Freude <alvar(at)a-blast(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: 2 Selects 1 is faster, why?
Date: 2002-06-28 03:52:40
Message-ID: 2367.1025236360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Keith Gray <keith(at)heart(dot)com(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message q u a d r a 2002-06-28 03:58:39 time difference
Previous Message Tatsuo Ishii 2002-06-28 01:46:48 Re: Slow SELECT -> Growing Database