Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8G4YI724562 for ; Sun, 16 Sep 2001 00:34:18 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f8G4YFK16543; Sun, 16 Sep 2001 00:34:16 -0400 (EDT) To: "Robert J. Sanford, Jr." cc: pgsql-sql@postgresql.org Subject: Re: optimizing queries and indexes... In-reply-to: References: Comments: In-reply-to "Robert J. Sanford, Jr." message dated "Fri, 07 Sep 2001 22:53:09 -0500" Date: Sun, 16 Sep 2001 00:34:15 -0400 Message-ID: <16540.1000614855@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200109/88 X-Sequence-Number: 4752 [ Sorry for slow response, I've been out of town ] "Robert J. Sanford, Jr." 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