{"id":2611,"date":"2013-05-27T17:51:59","date_gmt":"2013-05-27T08:51:59","guid":{"rendered":"http:\/\/www.techscore.com\/blog\/?p=2611"},"modified":"2018-11-14T16:33:55","modified_gmt":"2018-11-14T07:33:55","slug":"postgresql-index-only-scan-%e5%a5%ae%e9%97%98%e8%a8%98-%e3%81%9d%e3%81%ae1","status":"publish","type":"post","link":"https:\/\/www.techscore.com\/blog\/2013\/05\/27\/postgresql-index-only-scan-%e5%a5%ae%e9%97%98%e8%a8%98-%e3%81%9d%e3%81%ae1\/","title":{"rendered":"PostgreSQL Index Only Scan \u596e\u95d8\u8a18 \u305d\u306e1"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001\u6751\u4e0a\u3067\u3059\u3002<\/p>\n<p>\u4e45\u3005\u306e\u767b\u5834\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u304b\u3089\u4f55\u56de\u304bPostgreSQL9.2\u306e\u6a5f\u80fd\u3067\u3042\u308b<strong>\u300cIndex Only Scan\u300d<\/strong>\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u306fIBM\u306eDB2\u3068\u3044\u3046DBMS\u30926\u5e74\u307b\u3069\u89e6\u3063\u3066\u304a\u308a\u3001\u3053\u30531\u5e74\u534a\u3050\u3089\u3044\u306fPostgreSQL\u3092\u3084\u3063\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\u306a\u3093\u3067\u3001\u5c11\u3057PostgreSQL\u306b\u3064\u3044\u3066\u308f\u304b\u3063\u3066\u304d\u305f(\uff1f)\u611f\u3058\u306a\u3093\u3067\u3001\u3061\u3087\u3044\u3068\u66f8\u3053\u3046\u304b\u306a\u3063\u3066\u3044\u3046\u8efd\u3044\u30ce\u30ea\u3067\u3059\u3002<br \/>\n\u3088\u304b\u3063\u305f\u3089\u8aad\u3093\u3067\u4e0b\u3055\u3044\u3002<\/p>\n<h2>Index Only Scan \u306e\u524d\u306b\u3044\u308d\u3044\u308d\u3068<\/h2>\n<p>Index Only Scan\u3067\u3059\u304c\u3001PostgreSQL\u306b\u3068\u3063\u3066\u306f\u6700\u8fd1\u8ffd\u52a0\u3055\u308c\u305f\u76ee\u65b0\u3057\u3044\u6a5f\u80fd\u3067\u3059\u304c\u3001\u4ed6\u306eDBMS\u3067\u306f\u5272\u308a\u3068\u666e\u901a\u306b\u3042\u308b\u6a5f\u80fd\u3067\u3059\u3002<br \/>\n\u5185\u5bb9\u3092\u5358\u306b\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u306f\u9762\u767d\u304f\u306a\u3044\u306e\u3067\u3001\u306a\u305cPostgreSQL\u3067\u306f\u5b9f\u88c5\u304c\u96e3\u3057\u304b\u3063\u305f\u306e\u304b\u3068\u304b\u5b9f\u969b\u4f7f\u3063\u3066\u307f\u308b\u3068\u3044\u308d\u3044\u308d\u3068\u4e0d\u601d\u8b70\u306a\u3053\u3068\u304c\u8d77\u304d\u305f\u306e\u3067\u3001\u305d\u3053\u3089\u8fba\u3092\u4ea4\u3048\u3066\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305a\u3001\u4eca\u56de\u306fIndex Only Scan\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306aPostgreSQL\u306e\u6027\u8cea\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\u8ffd\u8a18\u578b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/h2>\n<p>PostgreSQL\u3092\u4f7f\u3044\u51fa\u3057\u3066\u4e00\u756a\u826f\u304f\u805e\u304f\u5358\u8a9e\u304c\u300c\u30d0\u30ad\u30e5\u30fc\u30e0(vacuum)\u300d\u3067\u3059\u3002<br \/>\nDB2\u3092\u4f7f\u3063\u3066\u305f\u6642\u3082\u8868\u306e\u518d\u7de8\u6210(REORG)\u3001\u7d71\u8a08\u60c5\u5831\u306e\u66f4\u65b0(RUNSTATS)\u3092\u3084\u3063\u3066\u3066\u305f\u306e\u3067\u3001\u305d\u3093\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u4f7f\u3063\u3066\u307e\u3057\u305f\u3051\u3069\u3001\u5168\u7136\u9055\u3044\u307e\u3057\u305f\u306d\u3002\u3002\u3002<\/p>\n<p>PostgreSQL\u306f\u8ffd\u8a18\u578b\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3064\u307e\u308a\u3001\u30c7\u30fc\u30bf\u3092\u524a\u9664(DELETE)\u3059\u308b\u6642\u306f\u3001\u7269\u7406\u7684\u306b\u524a\u9664\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u524a\u9664\u30d5\u30e9\u30b0\u3092\u7acb\u3066\u3066\u8ad6\u7406\u7684\u306b\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30c7\u30fc\u30bf\u306e\u66f4\u65b0(UPDATE)\u306e\u6642\u306f\u3001\u7269\u7406\u30c7\u30fc\u30bf\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u524a\u9664(DELETE)\u3068\u633f\u5165(INSERT)\u3092\u884c\u3044\u8ad6\u7406\u7684\u306b\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-1.png\" rel=\"facebox\" rel=\"attachment wp-att-2623\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-2623\" style=\"width: 600px;\" alt=\"postgresql-techscore-blog1-1\" src=\"https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-1.png\" width=\"300\" height=\"199\" srcset=\"https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-1.png 914w, https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-1-300x199.png 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3053\u3046\u306a\u3063\u3066\u304f\u308b\u3068\u983b\u7e41\u306b\u524a\u9664\u3084\u66f4\u65b0\u304c\u884c\u308f\u308c\u308b\u30c6\u30fc\u30d6\u30eb\u306f\u8ad6\u7406\u7684\u306b\u306f\u884c\u6570\u304c\u540c\u3058\u3067\u3082\u3001\u7269\u7406\u7684\u306a\u30b5\u30a4\u30ba\u306f\u3069\u3093\u3069\u3093\u5927\u304d\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092\u7dba\u9e97\u306b\u3057\u3066\u304f\u308c\u308b\u306e\u304c\u30d0\u30ad\u30e5\u30fc\u30e0\u3067\u3059\u3002<\/p>\n<p>\u30d0\u30ad\u30e5\u30fc\u30e0\u3092\u884c\u3046\u3053\u3068\u3067\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u306e\u4e0d\u8981\u9818\u57df\u3092\u56de\u53ce\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-2.png\" rel=\"facebox\" rel=\"attachment wp-att-2627\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-2627\" style=\"width: 600px;\" alt=\"postgresql-techscore-blog1-2\" src=\"https:\/\/www.techscore.com\/blog\/wp\/wp-content\/uploads\/2013\/05\/postgresql-techscore-blog1-2.png\" width=\"300\" height=\"71\" \/><\/a><\/p>\n<p>VACUUM\u306f\u4e0d\u8981\u9818\u57df\u306b\u5bfe\u3057\u3066\u3001\u7a7a\u304d\u9818\u57df\u306e\u5370\u3092\u4ed8\u3051\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30c7\u30fc\u30bf\u304cInsert\u3055\u308c\u305f\u5834\u5408\u306f\u3001\u305d\u306e\u7a7a\u304d\u9818\u57df\u306b\u30c7\u30fc\u30bf\u304c\u633f\u5165\u3055\u308c\u307e\u3059\u3002<br \/>\nVACUUM FULL\u306f\u4e0d\u8981\u9818\u57df\u3092\u524a\u9664\u3057\u3066\u30c7\u30fc\u30bf\u3092\u3064\u3081\u3066\u3044\u304d\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u65b0\u305f\u306b\u30c7\u30fc\u30bf\u304cInsert\u3055\u308c\u305f\u5834\u5408\u306f\u3001\u672b\u5c3e\u306b\u30c7\u30fc\u30bf\u304c\u633f\u5165\u3055\u308c\u307e\u3059\u3002<br \/>\n\u7269\u7406\u9818\u57df\u3092\u6e1b\u3089\u3057\u305f\u3044\u5834\u5408\u306fVACUUM FULL\u3092\u3059\u308b\u306e\u304c\u826f\u3044\u306e\u3067\u3059\u304c\u3001VACUUM FULL\u306b\u306f\u6392\u4ed6\u30ed\u30c3\u30af\u3092\u5fc5\u8981\u3068\u3059\u308b\u305f\u3081\u7a3c\u50cd\u4e2d\u306b\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f<\/p>\n<ul>\n<li>PostgreSQL\u306f\u300c\u8ffd\u8a18\u578b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u300d\u3092\u63a1\u7528\u3057\u3066\u3044\u308b<\/li>\n<li>\u30d0\u30ad\u30e5\u30fc\u30e0\u91cd\u8981<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u30d0\u30ad\u30e5\u30fc\u30e0\u51e6\u7406\u3063\u3066\u9045\u304f\u306a\u3044\u306e\uff1f\u3068\u304b\u8ffd\u8a18\u578b\u306e\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3069\u3046\u306a\u308b\u306e\uff1f<br \/>\n\u3068\u304b\u7591\u554f\u304c\u51fa\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u8fba\u308a\u306f\u6b21\u56de\u4ee5\u964d\u306b\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u8ffd\u8a18\u578b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<br \/>\n\u30d0\u30ad\u30e5\u30fc\u30e0\u3000\u3000\u3000\u3000\u3000\u2190 \u3044\u307e\u30b3\u30b3<br \/>\nVisibility Map<br \/>\n\u30d7\u30e9\u30f3\u6f14\u7b97\u5b50<br \/>\nIndex Only Scan<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001\u6751\u4e0a\u3067\u3059\u3002<\/p>\n<p>\u4e45\u3005\u306e\u767b\u5834\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u304b\u3089\u4f55\u56de\u304bPostgreSQL9.2\u306e\u6a5f\u80fd\u3067\u3042\u308b\u300cIndex Only Scan\u300d\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/><a href=\"https:\/\/www.techscore.com\/blog\/2013\/05\/27\/postgresql-index-only-scan-%e5%a5%ae%e9%97%98%e8%a8%98-%e3%81%9d%e3%81%ae1\/\">\u7d9a\u304d\u3092\u8aad\u3080...<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[97],"tags":[206],"_links":{"self":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2611"}],"collection":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/comments?post=2611"}],"version-history":[{"count":1,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2611\/revisions"}],"predecessor-version":[{"id":17932,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/2611\/revisions\/17932"}],"wp:attachment":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/media?parent=2611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/categories?post=2611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/tags?post=2611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}