title: How to know the usage of temporary tablespace in Oracle
body: <p>I am trying to compare two tables which are very large in my system(Oracle 10g).
  The way I used to compare is the "MINUS" operation.
  Because of the large size of tables, I want to know the usage of the temporary tablespace
  on the real time.</p>
  
  <p>I googled someways on how to get the usage of the tempory tablespace. But I am not sure 
  which one is right.Here are the three ways:</p>
  
  <p>1.select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;</p>
  
  <p>2.select BYTES_USED,BYTES_CACHED from V$TEMP_EXTEND_POOL</p>
  
  <pre><code>   What is the difference of BYTES_USED and BYTES_CACHED
  </code></pre>
  
  <p>3.select USED_EXTENDS, USED_BLOCKS v$sort_segment</p>
  
  <p>the three ways really confused me a lot and I don't know what is the difference.</p>