From derby-dev-return-758-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Sat Oct 16 15:40:03 2004 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 16746 invoked from network); 16 Oct 2004 15:40:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Oct 2004 15:40:02 -0000 Received: (qmail 2796 invoked by uid 500); 16 Oct 2004 15:40:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 2689 invoked by uid 500); 16 Oct 2004 15:39:54 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 2563 invoked by uid 99); 16 Oct 2004 15:39:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [66.163.170.83] (HELO smtp813.mail.sc5.yahoo.com) (66.163.170.83) by apache.org (qpsmtpd/0.28) with SMTP; Sat, 16 Oct 2004 08:39:41 -0700 Received: from unknown (HELO debrunners.com) (ddebrunner@sbcglobal.net@66.125.228.84 with plain) by smtp813.mail.sc5.yahoo.com with SMTP; 16 Oct 2004 15:39:07 -0000 Message-ID: <41714063.7040202@debrunners.com> Date: Sat, 16 Oct 2004 08:38:11 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1) Gecko/20031008 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Hints References: <416AE395.8050000@enigma.com> In-Reply-To: X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeffrey Lichtman wrote: > >> The PROPERTIES keyword and optimizer hints have been removed >> from Cloudscape before the code was contributed to Derby. >> I'm not sure where you've found the PROPERTIES keyword, but >> as far as I can tell it is no longer part of the manual. >> >> The reason it was removed is because the syntax is non-standard SQL. > > > Removing optimizer hints (and other hints) from the language because > they are non-standard is pretty ridiculous, in my opinion. Hints are > almost inevitably non-standard. The SQL standard doesn't even recognize > the concept of optimization, much less optimizer hints. > > Given that optimizer hints are useful (even necessary), how could one > support them in a "standard" way? I suppose they could be hidden in > comments, although building the support for this isn't simple Another potential way to support hints is to do it in configuration, outside of the application. Basically something that mapped from the query string to a set of hints. This would then allow hints to be applied to an existing application without any code changes, even to a compiled application. To me, this seems a far more flexible approach than requiring re-writes of the application. An XML form might be the easiest, something like select a, b from s, t where c = d s sx
t tx
Though, relying on XML for Derby will increase its footprint. Maybe there is a way to do something similar in the standard java properties format, or a derby format just for this issue. Dan. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBcUBiIv0S4qsbfuQRAjYvAKDWrL9eUJZQnoaQN76rmlMrYGyLSgCdFHfZ 1rCMpvqMsCP6OIddf948xgA= =98JC -----END PGP SIGNATURE-----