Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA18963 for ; Wed, 7 Jul 1999 12:46:16 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id MAA01466; Wed, 7 Jul 1999 12:45:07 -0400 (EDT) From: Bruce Momjian Message-Id: <199907071645.MAA01466@candle.pha.pa.us> Subject: Re: [SQL] Good Optimization In-Reply-To: from "Roderick A. Anderson" at "Jul 7, 1999 08:22:31 am" To: "Roderick A. Anderson" Date: Wed, 7 Jul 1999 12:45:07 -0400 (EDT) CC: PG-SQL X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Also if the optimizer works similar to Oracle then the order of > where statements would also help in actual performance. I'm mostly a > lurker on this list but have never seen anything about this issue. > When using Oracle, and won't it be nice when people mention PostgreSQL > functionality when comparing other databases, the statements at the > bottom should be the most restrictive and joins should be near the top. > > select * > from po,tickets > where po_id=material_po > and po_id=8888 ; > > Would be the best. Whereas > > select * > from po,tickets > where po_id=8888 > and po_id=material_po; > > would do the join then select those tuples that have a po_id of 8888. > > Of course this is probably what PostgreSQL is doing already without a > requirement for the positioning. This is not your mother's database. We don't care about statement ordering. :-) -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026