The kludge I came up with (by fooling the parser) is kinda ugly, but I
didn't propose adding this facility to the API because I can't think of a
good API for it.

Would it be declared in the XML?  No, that wouldn't really work because the
point of hints is that there's something special about the particular query
you're running that the cost-based optimizer can't figure out, so it's
really needs to be Query-specific.  (Generally speaking -- not always,
certainly -- if you need to use hints in a more general fashion then you
really need to tune the DB itself...)

Add a "setHints(String)" method to Query?  I'd rather not see the Query
interface get polluted with vendor-specific APIs.

Create a OracleQuery (or, better, HintableQuery) interface that has the
setHints(String) method?  Better, but now QueryFactory starts getting
polluted.

Create a "setSomethingMoreGenericThanHints" method?  I don't really know
what you would call it...

I'd like to not have to kludge things in my code, but I can't think of a
proposal that's not also kludgy for OJB, which would be even worse...

-Jim Moore


-----Original Message-----
From: Matthew Baird [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 02, 2003 3:57 PM
To: OJB Users List
Subject: RE: Oracle hints


this is a GREAT idea and could easily be added to the query API. We've been
thinking about adding this for a while.
 
Of course you would want to add some abstraction to support hints in a
variety of different DB's or at least a "only execute this on db XXX"
 
cheers,
Matthew

        -----Original Message----- 
        From: Jim Moore [mailto:[EMAIL PROTECTED] 
        Sent: Sat 8/2/2003 12:15 PM 
        To: 'OJB Users List' 
        Cc: 
        Subject: Oracle hints
        
        

        Is there any way to specify "hints" to Oracle via OJB?  eg, Tell
Oracle to
        use a particular index, the rule-based engine, etc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to