SQL Performance (MOSC)

MOSC Banner

NVL not using index on table

edited Aug 4, 2017 5:01AM in SQL Performance (MOSC) 6 commentsAnswered

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  '

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center