Skip to content

Instantly share code, notes, and snippets.

@RichVRed
Forked from ryanthames/index_info.sql
Created April 28, 2017 23:55
Show Gist options
  • Select an option

  • Save RichVRed/af8613d2805ba85ce27a709d65cd31c4 to your computer and use it in GitHub Desktop.

Select an option

Save RichVRed/af8613d2805ba85ce27a709d65cd31c4 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