From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] optimizing 2-table join w/millions of rows
Date: Mon, 23 Nov 1998 18:36:26 +0200
Message-ID: <l03110701b27f3f164fd6@[147.233.159.109]> (raw)
In-Reply-To: <18394.911837459@sss.pgh.pa.us>
References: <199811230400.XAA04611@hub.org>
At 18:10 +0200 on 23/11/98, Tom Lane wrote:
> Here, indexes on the part number would be stressed. You'd have to
> experiment to see which is faster on your data. (As far as I know,
> the Postgres optimizer will always evaluate your AND clauses left to
> right, which means that the key to performance is to make the leftmost
> clause reject as large a fraction of candidate rows as possible.)
I thought the optimizer canonized the where clause into an ANDing of ORs,
and then sought the best solution. That is, that the order of the clauses
did not matter, because the optimizer would know that comparison to a
literal on an indexed column is better than comparison to a field.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: herouth@oumail.openu.ac.il
Subject: Re: [SQL] optimizing 2-table join w/millions of rows
In-Reply-To: <l03110701b27f3f164fd6@[147.233.159.109]>
References: <199811230400.XAA04611@hub.org> <l03110701b27f3f164fd6@[147.233.159.109]>
* 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