Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:43:30+00:00 2026-06-03T00:43:30+00:00

I have been wanting to know for some time, how the internal working is

  • 0

I have been wanting to know for some time, how the internal working is done for DECODE and NVL function.
Does the DECODE function have more overhead in case the number of arguments in it are more?

Also, does the NVL function evaluate the value given instead of NULL, even if the original value is not NULL
e.g. for NVL(COL1, func_call())
would the func_call() be calculated even if COL1 is not NULL. In that case, it might create performance issue if the COL1 is rarely null and func_call() is time consuming.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:43:31+00:00Added an answer on June 3, 2026 at 12:43 am

    NVL always evaluates both arguments, so even if COL1 is not null it will evaluate func_call()

    Decode does short circuit, so the first valid condition stops execution.

    With similar arguments performance is pretty similar between the two. I usually just choose based on simplicity – NVL unless I need to have a if-then-else type construct.

    —-EDIT—-

    In situations where you do use NVL if you find yourself doing nested NVL like nvl(col1, nvl(col2, ‘0’)) take a look at the coalesce function where this would be expressed as coalesce(col1, col2, ‘0’) – returns the first non-null argument

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been wanting to get a thumbnail of websites for quite some time
I have this code I been working on but I'm having a hard time
I've been wanting to learn some Haskell for a while now, and I know
I've been working with a developer on a web-based application. I have some experience
I have been wanting to make a circular preloader in my iPhone app, but
I've been wanting to have a play with either Ruby or Python while at
Alrighty so, I've been wanting to learn C for awhile, and now I have
Have been working on this question for a couple hours and have come close
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I have been working as a .net developer following the waterfall model. When working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.