{"id":792,"date":"2013-01-18T01:23:02","date_gmt":"2013-01-17T16:23:02","guid":{"rendered":"http:\/\/apollo89.com\/wordpress\/?p=792"},"modified":"2013-02-22T08:23:44","modified_gmt":"2013-02-21T23:23:44","slug":"mysql-db%eb%b3%84-%eb%98%90%eb%8a%94-table%eb%b3%84-%ec%82%ac%ec%9a%a9%eb%9f%89size-%ed%99%95%ec%9d%b8","status":"publish","type":"post","link":"https:\/\/apollo89.com\/wordpress\/?p=792","title":{"rendered":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778<\/p>\n<p>1. Database \ubcc4 \uc0ac\uc774\uc988 \ud655\uc778 (\ucffc\ub9ac \uc2dc\uc810\uc5d0 \uc815\ud655\ud55c \uc0ac\uc774\uc988\ub294 \uc544\ub2c8\uc9c0\ub9cc, \ucc38\uace0\ud560 \ub9cc\ud55c \ub370\uc774\ud130\uc784)<\/p>\n<pre class=\"lang:pgsql decode:true \" >SELECT\r\n\tcount(*) NUM_OF_TABLE,\r\n\ttable_schema,concat(round(sum(table_rows)\/1000000,2),'M') rows,\r\n\tconcat(round(sum(data_length)\/(1024*1024*1024),2),'G') DATA,\r\n\tconcat(round(sum(index_length)\/(1024*1024*1024),2),'G') idx,\r\n\tconcat(round(sum(data_length+index_length)\/(1024*1024*1024),2),'G') total_size,\r\n\tround(sum(index_length)\/sum(data_length),2) idxfrac\r\nFROM information_schema.TABLES\r\nGROUP BY table_schema\r\nORDER BY sum(data_length+index_length) DESC LIMIT 10;<\/pre>\n<p>2. \ud14c\uc774\ube14\ubcc4 \uc0ac\uc774\uc988 \ud655\uc778 (\ucffc\ub9ac \uc2dc\uc810\uc5d0 \uc815\ud655\ud55c \uc0ac\uc774\uc988\ub294 \uc544\ub2c8\uc9c0\ub9cc, \ucc38\uace0\ud560 \ub9cc\ud55c \ub370\uc774\ud130\uc784)<\/p>\n<pre class=\"lang:pgsql decode:true \" >SELECT \r\n    table_name,\r\n    table_rows,\r\n    round(data_length\/(1024*1024),2) as 'DATA_SIZE(MB)',\r\n    round(index_length\/(1024*1024),2) as 'INDEX_SIZE(MB)'\r\nFROM information_schema.TABLES\r\nwhere table_schema = 'dbname'\r\nGROUP BY table_name \r\nORDER BY data_length DESC \r\nLIMIT 10;\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 1. Database \ubcc4 \uc0ac\uc774\uc988 \ud655\uc778 (\ucffc\ub9ac \uc2dc\uc810\uc5d0 \uc815\ud655\ud55c \uc0ac\uc774\uc988\ub294 \uc544\ub2c8\uc9c0\ub9cc, \ucc38\uace0\ud560 \ub9cc\ud55c \ub370\uc774\ud130\uc784) SELECT count(*) NUM_OF_TABLE, table_schema,concat(round(sum(table_rows)\/1000000,2),&#8217;M&#8217;) rows, concat(round(sum(data_length)\/(1024*1024*1024),2),&#8217;G&#8217;) DATA, concat(round(sum(index_length)\/(1024*1024*1024),2),&#8217;G&#8217;) idx, concat(round(sum(data_length+index_length)\/(1024*1024*1024),2),&#8217;G&#8217;) total_size, round(sum(index_length)\/sum(data_length),2) idxfrac FROM information_schema.TABLES GROUP BY table_schema ORDER BY &hellip; <a href=\"https:\/\/apollo89.com\/wordpress\/?p=792\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[685],"tags":[691,90,692],"class_list":["post-792","post","type-post","status-publish","format-standard","hentry","category-database-","tag-db-size","tag-mysql","tag-table-size"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com<\/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:\/\/apollo89.com\/wordpress\/?p=792\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com\" \/>\n<meta property=\"og:description\" content=\"&nbsp; mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 1. Database \ubcc4 \uc0ac\uc774\uc988 \ud655\uc778 (\ucffc\ub9ac \uc2dc\uc810\uc5d0 \uc815\ud655\ud55c \uc0ac\uc774\uc988\ub294 \uc544\ub2c8\uc9c0\ub9cc, \ucc38\uace0\ud560 \ub9cc\ud55c \ub370\uc774\ud130\uc784) SELECT count(*) NUM_OF_TABLE, table_schema,concat(round(sum(table_rows)\/1000000,2),&#039;M&#039;) rows, concat(round(sum(data_length)\/(1024*1024*1024),2),&#039;G&#039;) DATA, concat(round(sum(index_length)\/(1024*1024*1024),2),&#039;G&#039;) idx, concat(round(sum(data_length+index_length)\/(1024*1024*1024),2),&#039;G&#039;) total_size, round(sum(index_length)\/sum(data_length),2) idxfrac FROM information_schema.TABLES GROUP BY table_schema ORDER BY &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/apollo89.com\/wordpress\/?p=792\" \/>\n<meta property=\"og:site_name\" content=\"Apollo89.com\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-17T16:23:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-02-21T23:23:44+00:00\" \/>\n<meta name=\"author\" content=\"apollo89\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"apollo89\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792\"},\"author\":{\"name\":\"apollo89\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\"},\"headline\":\"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778\",\"datePublished\":\"2013-01-17T16:23:02+00:00\",\"dateModified\":\"2013-02-21T23:23:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792\"},\"wordCount\":11,\"commentCount\":0,\"keywords\":[\"db size\",\"mysql\",\"table size\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792\",\"name\":\"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#website\"},\"datePublished\":\"2013-01-17T16:23:02+00:00\",\"dateModified\":\"2013-02-21T23:23:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?p=792#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\\\/\\\/apollo89.com\\\/wordpress\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/\",\"name\":\"Apollo89.com\",\"description\":\"\uc544\ud3f4\ub85c\uc528\uc758 \uc7a1\ub2e4\ud55c \uacbd\ud5d8\ub4e4..\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/93f56825cac3b2f18e5f107995066c82\",\"name\":\"apollo89\",\"description\":\"\uc544\ud3f4\ub85c89 \uc785\ub2c8\ub2e4.\",\"url\":\"https:\\\/\\\/apollo89.com\\\/wordpress\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com","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:\/\/apollo89.com\/wordpress\/?p=792","og_locale":"ko_KR","og_type":"article","og_title":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com","og_description":"&nbsp; mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 1. Database \ubcc4 \uc0ac\uc774\uc988 \ud655\uc778 (\ucffc\ub9ac \uc2dc\uc810\uc5d0 \uc815\ud655\ud55c \uc0ac\uc774\uc988\ub294 \uc544\ub2c8\uc9c0\ub9cc, \ucc38\uace0\ud560 \ub9cc\ud55c \ub370\uc774\ud130\uc784) SELECT count(*) NUM_OF_TABLE, table_schema,concat(round(sum(table_rows)\/1000000,2),'M') rows, concat(round(sum(data_length)\/(1024*1024*1024),2),'G') DATA, concat(round(sum(index_length)\/(1024*1024*1024),2),'G') idx, concat(round(sum(data_length+index_length)\/(1024*1024*1024),2),'G') total_size, round(sum(index_length)\/sum(data_length),2) idxfrac FROM information_schema.TABLES GROUP BY table_schema ORDER BY &hellip; Continue reading &rarr;","og_url":"https:\/\/apollo89.com\/wordpress\/?p=792","og_site_name":"Apollo89.com","article_published_time":"2013-01-17T16:23:02+00:00","article_modified_time":"2013-02-21T23:23:44+00:00","author":"apollo89","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"apollo89","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/apollo89.com\/wordpress\/?p=792#article","isPartOf":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=792"},"author":{"name":"apollo89","@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82"},"headline":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778","datePublished":"2013-01-17T16:23:02+00:00","dateModified":"2013-02-21T23:23:44+00:00","mainEntityOfPage":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=792"},"wordCount":11,"commentCount":0,"keywords":["db size","mysql","table size"],"articleSection":["Database"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/apollo89.com\/wordpress\/?p=792#respond"]}]},{"@type":"WebPage","@id":"https:\/\/apollo89.com\/wordpress\/?p=792","url":"https:\/\/apollo89.com\/wordpress\/?p=792","name":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778 - Apollo89.com","isPartOf":{"@id":"https:\/\/apollo89.com\/wordpress\/#website"},"datePublished":"2013-01-17T16:23:02+00:00","dateModified":"2013-02-21T23:23:44+00:00","author":{"@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82"},"breadcrumb":{"@id":"https:\/\/apollo89.com\/wordpress\/?p=792#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/apollo89.com\/wordpress\/?p=792"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/apollo89.com\/wordpress\/?p=792#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/apollo89.com\/wordpress"},{"@type":"ListItem","position":2,"name":"mysql DB\ubcc4 \ub610\ub294 Table\ubcc4 \uc0ac\uc6a9\ub7c9(Size) \ud655\uc778"}]},{"@type":"WebSite","@id":"https:\/\/apollo89.com\/wordpress\/#website","url":"https:\/\/apollo89.com\/wordpress\/","name":"Apollo89.com","description":"\uc544\ud3f4\ub85c\uc528\uc758 \uc7a1\ub2e4\ud55c \uacbd\ud5d8\ub4e4..","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/apollo89.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/apollo89.com\/wordpress\/#\/schema\/person\/93f56825cac3b2f18e5f107995066c82","name":"apollo89","description":"\uc544\ud3f4\ub85c89 \uc785\ub2c8\ub2e4.","url":"https:\/\/apollo89.com\/wordpress\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=792"}],"version-history":[{"count":0,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/792\/revisions"}],"wp:attachment":[{"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apollo89.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}