Quick question on something I'm slightly confused over. I know to get the best performance you need to bind so it gets in the shared pool. Does that mean in a pl/sql cursor that you should never have any hardcoded literals, or is it just on key fields that it should never be?
For instance does the 'Y' flag need to be bound using a variable?
cursor c1 is
select *
from table
where pk = p_some_value and
enabled_flag = 'Y';
select *
from table
where pk = p_some_value and
enabled_flag = p_yes;
That is one thing I've never understood is whether that the Y flag really needs to be bound using a variable, or whether hard-coding it in there is acceptable. Any responses would be appreciated - thanks!