NVL not using index on table
Hi,
We have this query:
update im_doc_head idh set status = nvl(:1, status), pre_paid_ind = nvl( :2, pre_paid_ind) , pre_paid_id = nvl(:3, pre_paid_id), post_date = (select vdate from period), hold_status = nvl(:4, hold_status) where idh.type = nvl(:5, idh.type) and exists (select :"SYS_B_0" from im_posting_doc ipd where ipd.posting_id = :6 and ipd.doc_id = nvl(:7, ipd.doc_id) and ipd.doc_id = idh.doc_id and ipd.has_errors = nvl(:8, ipd.has_errors) )
Explain plan shows that it is using a full table scan on IM_DOC_HEAD because of the '