DBA_SEGMENTS don’t show my new partition table information on oracle 19c

We have a new partition table. I wanted to get the, each sub partition size in GB.
But, couldn’t find these anything related to partition table in dba_segments.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>SELECT owner, segment_name, segment_type, partition_name,bytes/1024/1024/1024 "GB", tablespace_name
FROM DBA_SEGMENTS
WHERE SEGMENT_TYPE IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION',
'INDEX', 'INDEX PARTITION', 'INDEX SUBPARTITION')
AND SEGMENT_NAME LIKE 'TABLENAME'
ORDER BY bytes DESC;
</code>
<code>SELECT owner, segment_name, segment_type, partition_name,bytes/1024/1024/1024 "GB", tablespace_name FROM DBA_SEGMENTS WHERE SEGMENT_TYPE IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION', 'INDEX', 'INDEX PARTITION', 'INDEX SUBPARTITION') AND SEGMENT_NAME LIKE 'TABLENAME' ORDER BY bytes DESC; </code>
SELECT owner, segment_name, segment_type, partition_name,bytes/1024/1024/1024 "GB", tablespace_name
FROM DBA_SEGMENTS
WHERE SEGMENT_TYPE IN ('TABLE', 'TABLE PARTITION', 'TABLE SUBPARTITION',
'INDEX', 'INDEX PARTITION', 'INDEX SUBPARTITION')
AND SEGMENT_NAME LIKE 'TABLENAME'
ORDER BY bytes DESC;

Tried with above query, but I don’t see any of the records with my table name.

Please help, in locating my new partition table related size information for each sub partition.

5

Starting with 11.2, Oracle has a parameter called deferred_segment_creation which defaults to TRUE. When creating a new table or partitions, it creates the logical objects but does not yet allocate space in the tablespace, meaning there is no physical segment. dba_segments displays physical segments only. You can still see your logical objects in dba_objects, dba_indexes, dba_tables, dba_tab_partitions, etc.. where a column named SEGMENT_CREATED will say 'NO', telling you that it hasn’t created a physical segment yet for the object.

As soon as you insert a single row, it now must create a physical segment and allocate space in the tablespace. This is when rows will show up in dba_segments.

So, to see your table, start with the logical object views and outer join back on dba_segments to get size, interpreting a lack of any such row to mean no segment and therefore size 0 bytes. You will also need to modify your query to show the indexes separately, as that requires mapping your table name to the index names before you can find them in dba_segments:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>SELECT sp.table_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes
FROM dba_tab_subpartitions sp,
dba_segments s
WHERE sp.table_name = 'MYTABLENAME'
AND sp.table_owner = s.owner(+)
AND sp.table_name = s.segment_name(+)
AND sp.subpartition_name = s.partition_name(+)
UNION ALL
SELECT i.index_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes
FROM dba_indexes i,
dba_ind_subpartitions sp,
dba_segments s
WHERE i.table_name = 'MYTABLENAME'
AND i.owner = sp.index_owner(+)
AND i.index_name = sp.index_name(+)
AND sp.index_owner = s.owner(+)
AND sp.index_name = s.segment_name(+)
AND sp.subpartition_name = s.partition_name(+)
</code>
<code>SELECT sp.table_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes FROM dba_tab_subpartitions sp, dba_segments s WHERE sp.table_name = 'MYTABLENAME' AND sp.table_owner = s.owner(+) AND sp.table_name = s.segment_name(+) AND sp.subpartition_name = s.partition_name(+) UNION ALL SELECT i.index_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes FROM dba_indexes i, dba_ind_subpartitions sp, dba_segments s WHERE i.table_name = 'MYTABLENAME' AND i.owner = sp.index_owner(+) AND i.index_name = sp.index_name(+) AND sp.index_owner = s.owner(+) AND sp.index_name = s.segment_name(+) AND sp.subpartition_name = s.partition_name(+) </code>
SELECT sp.table_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes
  FROM dba_tab_subpartitions sp,
       dba_segments s
 WHERE sp.table_name = 'MYTABLENAME'
   AND sp.table_owner = s.owner(+)
   AND sp.table_name = s.segment_name(+)
   AND sp.subpartition_name = s.partition_name(+)
 UNION ALL
SELECT i.index_name,sp.partition_name,sp.subpartition_name,s.segment_type,NVL(s.bytes,0) bytes
  FROM dba_indexes i,
       dba_ind_subpartitions sp,
       dba_segments s
 WHERE i.table_name = 'MYTABLENAME'
   AND i.owner = sp.index_owner(+)
   AND i.index_name = sp.index_name(+)
   AND sp.index_owner = s.owner(+)
   AND sp.index_name = s.segment_name(+)
   AND sp.subpartition_name = s.partition_name(+) 

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật