Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA96383 for ; Mon, 19 Jul 1999 11:04:04 -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 KAA08753; Mon, 19 Jul 1999 10:37:58 -0400 (EDT) From: Bruce Momjian Message-Id: <199907191437.KAA08753@candle.pha.pa.us> Subject: Re: [SQL] Good Optimization In-Reply-To: <3793331B.21288516@kearneydev.com> from secret at "Jul 19, 1999 10:15:56 am" To: secret Date: Mon, 19 Jul 1999 10:37:58 -0400 (EDT) CC: Jan Wieck , Patrik Kudo , pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Why not let the user select how much time he wants the DB to spend on > optimization? maybe an explicit "FAST SELECT ..." will skip the costly steps > for subsecond queries, or "OPTIMIZE SELECT" for the long(hour) queries that > really need a lot of help :)... Or even a SET OPTION= for turning it on/off? In most cases, the optimizer knows much better how long to optimize, and the time it spends is usually very small. Most time is spent in executor. Pre-6.5 optimizer had problems, so this was not true then. -- 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