Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL fast, PL/SQL slow, optimizer confused.
Hi,
pl/sql always uses bind veriables, even explicit values are translated
into bind variables. This might give the optimizer fewer information
about the cardinality of the index access.
Try your explicit query with bind variables.
Give us the explain plans.
You can hint oracle to use index accesses by setting
optimizer_index_cost_adj to 10 and optimizer_index_caching to 90. Might
have side effects on other queries.
Stephan
Received on Wed Feb 18 2004 - 03:56:37 CST