title: Quickest query to check for the existence of a row in Oracle?
body: <p>I'm using Oracle, and I have a very large table.  I need to check for the existence of any row meeting some simple criteria.  What's the best way to go about this using simple SQL?</p>
  
  <p>Here's my best guess, and while it may turn out to be fast enough for my purposes, I'd love to learn a canonical way to basically do SQL Server's "exists" in Oracle:</p>
  
  <pre><code>select count(x_id) from x where x.col_a = value_a and x.col_b = value_b;
  </code></pre>
  
  <p>The count() would then be returned as a boolean in another tier.  The main point is that I want Oracle to do the bare minimum for this query - I only need to know if there are any rows matching the criteria.</p>
  
  <p>And yes, those columns will most definitely be indexed.</p>