Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Using Optimizer Hints

by sen (Hermit)
on Jul 24, 2015 at 13:39 UTC ( [id://1136167]=note: print w/replies, xml ) Need Help??


in reply to Re: Using Optimizer Hints
in thread Using Optimizer Hints

Thanks for the reply. But its not picked by the Oracle Optimizer when its executed through perl.

Replies are listed 'Best First'.
Re^3: Using Optimizer Hints
by chacham (Prior) on Jul 24, 2015 at 14:17 UTC

    When you run it directly in Oracle, is the hint used? That is, with a host variable.

      Yes, when i executed it direclty, the oracle optimizer uses the hint.

        I just want to be clear here. You are using it with a host variable in Oracle? That will match the prepare with a ?. For example:

        VAR Name VARCHAR2 EXPLAIN PLAN FOR SELECT /*+ index(a index1) */ name, age FROM people a + WHERE name LIKE :Name;

        Also, how are you verifying if the hint is being honored?

        Update: Related: Where the advice to use DBI bind parameters can go wrong (long)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1136167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found