From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: optimizing queries and indexes...
Date: Sun, 16 Sep 2001 00:34:15 -0400
Message-ID: <16540.1000614855@sss.pgh.pa.us> (raw)
In-Reply-To: <HOEFIONAHHKFEFENBMNOEELBCCAA.rsanford@nolimitsystems.com>
References: <HOEFIONAHHKFEFENBMNOEELBCCAA.rsanford@nolimitsystems.com>
[ Sorry for slow response, I've been out of town ]
"Robert J. Sanford, Jr." <rsanford@nolimitsystems.com> writes:
> [ some questions already ably answered by Josh and Stephan ]
I just wanted to throw in one more tidbit:
> for example, one thing that one of my friends said is:
> select X
> from big_table
> ,little_table
> Generally speaking, Oracle optimizes better
> when the smaller/reducing tables are on the
> bottom and the larger tables are on the top.
> I believe SQLServer likes them in the opposite
> direction.
Postgres absolutely does not care: the optimizer will always consider
both A-join-B and B-join-A orders for every join it has to do. As
Stephan and Josh noted, you can constrain the join pairs the optimizer
will consider if you use explicit-JOIN syntax --- but each pair will be
considered in both directions.
regards, tom lane
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, rsanford@nolimitsystems.com
Subject: Re: optimizing queries and indexes...
In-Reply-To: <16540.1000614855@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