How to view Oracle tables and index buckets

Source: Internet
Author: User

How to view OracleStorage space of tables and Indexes

 

In biI often see the data size of a month.

The data size of a month includes two parts:

LThe storage space of the table's data volume;

LThe storage space of the corresponding index of this table.

 

Here is an SQL statement used to view the total Bucket:

SelectTo_char (sum_mb/(Select count (1)
From (select period_name
From f_sbu_allocate_result_sum t
Group by period_name)
),
'999g999d999') sum_mb
From(Select Sum(Bytes)/(1024*1024) sum_mb
FromDba_extents
WhereOwner = 'amdm'
AndSegment_nameIn
('F _ sbu_allocate_result ', 'f _ sbu_allocate_result_all ',
'F _ sbu_allocate_result_sum ', 'f _ sbu_allocate_result_n3 ',
'F _ sbu_allocate_result_n2 ', 'f _ sbu_allocate_result_n ',
'F _ sbu_allocate_result_sum_u ')
)

The following describes how the preceding SQL statements are used:

First, look at the red part. This is an SQL statement used to calculate the month.

Then, the light blue part, the involved table, and the table index.

Of course, we still need to pay attention to the owner, which is mandatory and mainly used to differentiate users. Because different users may have tables with the same name or table indexes.

 

Of course, there are many ways to calculate tables and their indexes. Here is only one example.

For your reference.

 

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.