SQL query to view size of partitions that are compressed
Hi,
I would like to view the size of all my partiions that are using compression and how big they are in total. Im running this:
select count(*) , sum(s.bytes)/1024/1024/1024 GB from dba_segments s, DBA_TAB_PARTITIONS t where s.segment_name = t.table_name and t.compression = 'ENABLED' and s.owner='DW';
But the query has run for over 3h.
Is there a better way to check this?
Regards
S