{"id":10608,"date":"2017-11-02T17:13:29","date_gmt":"2017-11-02T16:13:29","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/"},"modified":"2017-11-02T17:13:29","modified_gmt":"2017-11-02T16:13:29","slug":"quick-history-on-database-growth","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/","title":{"rendered":"Quick history on database growth"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nAWR collects segment statistics, and this can be used to quickly understand an abnormal database growth. Here is a script I use to get, from the AWR history, the segments that have grown by more than 1% of the database size, in one hour.<br \/>\n<!--more--><br \/>\nFirst I must mention that this uses only the part of AWR which is not subject to additional option. This even works in Standard Edition:<\/p>\n<pre><code>NAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\ncontrol_management_pack_access       string      NONE<\/code><\/pre>\n<p>So here is the query, easy to modify with different threshold:<\/p>\n<pre><code>set echo on pagesize 1000\nset sqlformat ansiconsole\nselect * from (\nselect \n round(sum(SPACE_ALLOCATED_DELTA)\/1024\/1024\/1024) GBYTE_ALLOCATED\n ,trunc(max(end_interval_time),'hh24') snap_time\n ,round(sum(SPACE_ALLOCATED_DELTA)\/1024\/1024\/1024*24*(cast(max(end_interval_time) as date)-cast(min(begin_interval_time) as date))) \"GB\/hour\"\n ,owner,object_name,subobject_name,object_type\n from DBA_HIST_SEG_STAT join DBA_HIST_SEG_STAT_OBJ using (dbid,ts#,obj#,dataobj#) join dba_hist_snapshot using(dbid,snap_id)\n group by trunc(end_interval_time,'hh24'),owner,object_name,subobject_name,object_type\n) where \"GB\/hour\" &gt; (select sum(bytes)\/1024\/1024\/1024\/1e2 \"one percent of database size\" from dba_data_files)\norder by snap_time\n;<\/code><\/pre>\n<p>and the sample output, showing only the snapshots and segments where more than 1% of the database size has been allocated within one hour:<\/p>\n<pre><code>\n GBYTE_ALLOCATED  SNAP_TIME               GB\/hour  OWNER     OBJECT_NAME                 SUBOBJECT_NAME   OBJECT_TYPE\n ---------------  ---------               -------  -----     -----------                 --------------   -----------\n                4 25-OCT-2017 19:00:00           4 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                9 25-OCT-2017 20:00:00           9 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                9 25-OCT-2017 21:00:00           9 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                3 25-OCT-2017 22:00:00           3 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                5 26-OCT-2017 00:00:00           5 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                6 26-OCT-2017 01:00:00           6 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                7 26-OCT-2017 02:00:00           7 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                7 26-OCT-2017 03:00:00           7 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                7 26-OCT-2017 04:00:00           7 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                5 26-OCT-2017 05:00:00           5 BIGDATA   SYS_LOB0000047762C00006$$                    LOB\n                2 26-OCT-2017 06:00:00           2 BIGDATA   SYS_LOB0000047719C00008$$                    LOB\n                2 26-OCT-2017 06:00:00           2 BIGDATA   SYS_LOB0000047710C00006$$                    LOB\n<\/code><\/pre>\n<p>With this, it is easier to ask to the application owners if this growth is normal or not.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . AWR collects segment statistics, and this can be used to quickly understand an abnormal database growth. Here is a script I use to get, from the AWR history, the segments that have grown by more than 1% of the database size, in one hour.<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59],"tags":[422,1204,96,1171],"type_dbi":[],"class_list":["post-10608","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-awr","tag-growth","tag-oracle","tag-oracle-19c"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Quick history on database growth - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quick history on database growth\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . AWR collects segment statistics, and this can be used to quickly understand an abnormal database growth. Here is a script I use to get, from the AWR history, the segments that have grown by more than 1% of the database size, in one hour.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-02T16:13:29+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Quick history on database growth\",\"datePublished\":\"2017-11-02T16:13:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\"},\"wordCount\":128,\"commentCount\":0,\"keywords\":[\"AWR\",\"Growth\",\"Oracle\",\"Oracle 19c\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\",\"name\":\"Quick history on database growth - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2017-11-02T16:13:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quick history on database growth\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Quick history on database growth - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/","og_locale":"en_US","og_type":"article","og_title":"Quick history on database growth","og_description":"By Franck Pachot . AWR collects segment statistics, and this can be used to quickly understand an abnormal database growth. Here is a script I use to get, from the AWR history, the segments that have grown by more than 1% of the database size, in one hour.","og_url":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/","og_site_name":"dbi Blog","article_published_time":"2017-11-02T16:13:29+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Quick history on database growth","datePublished":"2017-11-02T16:13:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/"},"wordCount":128,"commentCount":0,"keywords":["AWR","Growth","Oracle","Oracle 19c"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/","url":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/","name":"Quick history on database growth - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-11-02T16:13:29+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/quick-history-on-database-growth\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Quick history on database growth"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10608"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10608\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10608"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=10608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}