Number of rows in Oracle table, table footprint, non-empty rows for columns, column space size query

Source: Internet
Author: User

--table name, table space Size (MB), number of rows
Select table_name, round (num_rows * avg_row_len/1024/1024, 8) as Total_len, num_rows

From User_tables

WHERE table_name = ' table name '

ORDER BY TABLE_NAME;

--table name, column name, column space Size (MB), number of non-empty rows

Select C.table_name, C.column_name, round ((t.num_rows-c.num_nulls) * c.avg_col_len/1024/1024, 8) as Total_len, T.num_ro Ws-c.num_nulls as Nums

From User_tab_columns C

Join User_tables t on c.table_name = T.table_name

where c.table_name = ' table name '

Order BY C.column_name;

Number of rows in Oracle table, table footprint, non-empty rows for columns, column space size query

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.