in reply to
Re: Where the advice to use DBI bind parameters can go wrong (long)
in thread Where the advice to use DBI bind parameters can go wrong (long)
There's probably a way to give Oracle an optimizer hint that would take care of this. I've seen DBAs use optimizer hints to make Oracle use certain indexes before.
Not in this case. Hints influence how a query gets executed, but not in ways (as far as I know) that would result in the answer being wrong. Honoring a "trust me, you can use an index" hint would result in a bogus result set if the value bound for a LIKE clause had a leading wildcard.
Hints are great when a query plan is joining tables in a reasonable, but suboptimal, sequence. Any way you join should give you the same result set.