-
-
Save RichVRed/893b124e8e5f4c953d74205c06594c1f to your computer and use it in GitHub Desktop.
Oracle - Table Information (https://app.pluralsight.com/library/courses/oracle-performance-tuning-developers/table-of-contents)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- table info is only as up to date as last time stats were gathered (last_analyzed) | |
| select t.owner, t.table_name, t.num_rows, t.avg_row_len, | |
| t.blocks as blocks_below_hwm, t.empty_blocks, | |
| s.blocks as segment_blocks, | |
| s.bytes / 1048576 as size_in_mb, | |
| to_char(t.last_analyzed, 'YYYY-MM-DD HH24:MI') as last_analyzed | |
| from all_tables t, dba_segments s | |
| where t.owner = s.owner and t.table_name = s.segment_name | |
| and t.owner = 'SCHEMA_NAME'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment