Hi, I would agree with you that the third option is best. > 3. Provide an offline tool which registers hints for SQL statements. > When those SQL statements are executed, Derby could look up previously > registered hints for those statements and automatically apply them. > Advantage of this scheme is that applications don't need to be modified > to add hints and they can easily be removed when not needed. How exactly > to register the hints could be worked out. I personally prefer this > approach.
How about manipulating the stats used by the optimizer and then storing the execution plan in a table? This is also a technique that is available in Oracle. Regards
