Skip to content

Instantly share code, notes, and snippets.

@ryanthames
Created April 1, 2016 14:49
Show Gist options
  • Save ryanthames/a565be4a0de7e969c6f88e84f073f875 to your computer and use it in GitHub Desktop.
Save ryanthames/a565be4a0de7e969c6f88e84f073f875 to your computer and use it in GitHub Desktop.
select ix.owner, ix.index_name, ix.table_name,
ix.distinct_keys, ix.leaf_blocks,
s.blocks as segment_blocks,
s.bytes / 1048576 as size_in_mb,
to_char(ix.last_analyzed, 'YYYY-MM-DD HH24:MI') as last_analyzed
from all_indexes ix, dba_segments s
where ix.owner = s.owner and ix.index_name = s.segment_name
order by ix.table_name, ix.index_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment