db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Hints
Date Sat, 16 Oct 2004 15:38:11 GMT
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
<table> s <index> sx </index> </table>
<table> t <index> tx </index> </table>

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.


Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


View raw message