title: Oracle select: Fastest way to get total number of rows
body: <p>I am executing a SQL query which scans couple of tables with million of rows.
  What I was trying to implement was my select query should return result only if the result set contains only one row.
  I knew these two approches to do it:</p>
  
  <p>1) Use group by and then 'having count( * )'</p>
  
  <p>2) Use inner query which further uses 'count( * ) over'</p>
  
  <p>But both of these approches would hamper the performance.
  I would like to know, if there is any other faster approach to do this. Let me know if you require more information.
  Thanks.</p>