Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8GKap747199 for ; Sun, 16 Sep 2001 16:36:52 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 119877; Sun, 16 Sep 2001 13:36:38 -0700 From: "Josh Berkus" Subject: Re: optimizing queries and indexes... To: Tom Lane , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Sun, 16 Sep 2001 13:36:38 -0700 Message-ID: In-Reply-To: <16540.1000614855@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===119877====davinci.ethosmedia.com===_" X-Archive-Number: 200109/95 X-Sequence-Number: 4759 This is a multi-part MIME message --_===119877====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Tom, > [ Sorry for slow response, I've been out of town ] Taking a much-deserved vacation, hey? Any new job plans? > 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. Fantastic! You may want to point out to unbelievers that MS SQL Server does not do this; if you fail to put your joins/where clauses in the *exact* order of the indecies in SQL Server, it ignores them and does a table scan. This is especially deadly because table scans are about 1/2 as fast in SQL Server as they are in Postgres. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===119877====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===119877====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===119877====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===119877====davinci.ethosmedia.com===_--