{"id":79,"date":"2023-02-13T18:58:57","date_gmt":"2023-02-13T16:58:57","guid":{"rendered":"http:\/\/130.61.57.200\/?p=79"},"modified":"2024-03-04T12:10:35","modified_gmt":"2024-03-04T10:10:35","slug":"find-a-table-size-including-dependent-objects","status":"publish","type":"post","link":"http:\/\/130.61.57.200\/index.php\/2023\/02\/13\/find-a-table-size-including-dependent-objects\/","title":{"rendered":"Find a table size including dependent objects"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Use the following query to find the size of a table including its indexes and LOBs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select name,sum(gb) from(\nselect case when segment_type in (&#039;TABLE&#039;,&#039;TABLE PARTITION&#039;) then s.SEGMENT_NAME \nwhen segment_type in (&#039;LOBSEGMENT&#039;,&#039;LOB PARTITION&#039;) then l.TABLE_NAME\nwhen segment_type in (&#039;INDEX&#039;,&#039;INDEX PARTITION&#039;) then i.table_name\nelse s.SEGMENT_NAME \nend name\n,bytes\/1024\/1024\/1024  gb\nfrom dba_segments s left join dba_lobs l on l.segment_name=s.segment_name\nleft join dba_indexes i on i.index_name=s.segment_name\nwhere segment_type not in (&#039;TYPE2 UNDO&#039;,&#039;ROLLBACK&#039;)\n)\ngroup by name\norder by 2 desc;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Use the following query to find the size of a table including its indexes and LOBs.<\/p>\n","protected":false},"author":1,"featured_media":106,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[39,29,38],"class_list":["post-79","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-lob","tag-size","tag-table"],"blocksy_meta":[],"_links":{"self":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":5,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":184,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/79\/revisions\/184"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media\/106"}],"wp:attachment":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}