Try this
TamilPHP Code:
select /*+ use_hash(b) */ a.*
from ( select /*+ NO_MERGE */
*
from dba_segments) a,
( select /*+ NO_MERGE */
tablespace_name , max(bytes) as free_bytes
from dba_free_space
group by tablespace_name ) b
where a.tablespace_name = b.tablespace_name and
a.next_extent > b.free_bytes ;