{"id":3287,"date":"2020-02-06T22:03:24","date_gmt":"2020-02-06T21:03:24","guid":{"rendered":"http:\/\/van-maanen.com\/?p=3287"},"modified":"2020-02-06T22:03:24","modified_gmt":"2020-02-06T21:03:24","slug":"size-on-oracle","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=3287","title":{"rendered":"Size on Oracle"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">What is the size of an Oracle table? A very rough approximation is to multiply the number of rows with the average row length in bytes. Fortunately, Oracle directly provide you with such information. Take this query:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select \ntable_name\n, num_rows\n, avg_row_len\n,to_char((num_rows * avg_row_len)\/1000000,'9999999D999','NLS_NUMERIC_CHARACTERS=''. ''') as sizeMB\n, blocks  \nfrom dba_tab_statistics where owner like 'ST%';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This can be verified in SQL Developer when you investigate the tablespaces:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/van-maanen.com\/wp-content\/uploads\/2020\/02\/Capture-6-1-1-1.png\" alt=\"\" class=\"wp-image-3288\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is the size of an Oracle table? A very rough approximation is to multiply the number of rows with the average row length in bytes. Fortunately, Oracle directly provide you with such information. Take this query: select table_name , num_rows , avg_row_len ,to_char((num_rows * avg_row_len)\/1000000,&#8217;9999999D999&#8242;,&#8217;NLS_NUMERIC_CHARACTERS=&#8221;. &#8221;&#8217;) as sizeMB , blocks from dba_tab_statistics where owner [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3287","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3287"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3287\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3287"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}