Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NVL(ROW, NULL) = NULL vs ROW IS NULL - Cost efficiency ?

581251Feb 14 2008 — edited Feb 14 2008
Hi !

A recent optimization report came back saying that on our more complex queries, the NVL(ROW, NULL) = NULL should be used instead of ROW IS NULL in our WHERE clauses.

For example, in the following WHERE clause using

WHERE (ROW1 = :VARIABLE OR NVL(ROW1, NULL) = NULL)

instead of

WHERE (ROW1 = :VARIABLE OR ROW1 IS NULL)

I have never seen a NVL(ROW, NULL) = NULL statement before and am having difficulty understanding how it could be more efficient.

Could someone please advise me on this ?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2008
Added on Feb 14 2008
5 comments
527 views