title: Why use NVL in WHERE clause (Oracle)
body: <p>I am repeatedly seeing queries similar to:</p>
  
  <pre><code>select count(*) 
  from some_table
  where nvl(some_column,'N') = 'Y';
  </code></pre>
  
  <p>Where <code>some_column</code> takes values in <code>('Y', 'N', null)</code>.</p>
  
  <p>Is there a reason this is being used rather than the following?</p>
  
  <pre><code>select count(*) 
  from some_table
  where some_column = 'Y';
  </code></pre>
  
  <p>From the few examples I've tried, there doesn't seem to be any performance advantage, and in a few cases the first query being slower.</p>
  
  <p>Thanks in advance.</p>