{"id":712,"date":"2017-11-09T18:27:35","date_gmt":"2017-11-09T09:27:35","guid":{"rendered":"http:\/\/fulfillment-c.com\/database\/?p=712"},"modified":"2024-11-28T09:26:46","modified_gmt":"2024-11-28T00:26:46","slug":"sql-analysis","status":"publish","type":"post","link":"https:\/\/fulfillment-c.com\/database\/sql-analysis\/","title":{"rendered":"SQL\u5206\u6790"},"content":{"rendered":"<h1>STATSPACK\u3092\u4f7f\u7528\u3057\u305fSQL\u5206\u6790<\/h1>\n<p><a href=\"http:\/\/fulfillment-c.com\/database\/statspack\/\" target=\"_blank\" rel=\"noopener\">STATSPACK<\/a>\u3092\u4f7f\u7528\u3057\u3066\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u308bSQL\u3092\u5206\u6790\u3057\u307e\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>SQL\u306b\u95a2\u3059\u308b\u60c5\u5831\u3068\u306f<\/h2>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/fulfillment-c.com\/database\/statspack\/\" target=\"_blank\" rel=\"noopener\">STATSPACK<\/a>\u306b\u306fSQL\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\uff16\u3064\u3042\u308a\u3001\u300cSQL\u3000XXX\u3000by\u3000XXX\u300d\u306e\u5f62\u5f0f\u3067\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u91cd\u8907\u3059\u308b\u60c5\u5831\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u554f\u984c\u3042\u308bSQL\u3092\u63a8\u6e2c\u3059\u308b\u306b\u306f\u6709\u52b9\u306a\u60c5\u5831\u3067\u3059<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u4e0a\u4f4d\u306b\u8868\u793a\u3055\u308c\u308bSQL\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff11\uff0eSQL ordered by CPU<\/h2>\n<p>SQL\u304cCPU\u8ca0\u8377\u306e\u9ad8\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u51e6\u7406\u8ca0\u8377\u304c\u9ad8\u3044\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u307e\u305a\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u5bfe\u8c61\u3068\u8003\u3048\u307e\u3059<\/p>\n<p>\u7121\u99c4\u306a\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u306e\u3067\u3001\u51e6\u7406\u8ca0\u8377\u304c\u9ad8\u3044\u539f\u56e0\u3092\u5206\u6790\u3057\u307e\u3059<\/p>\n<p>LOOP\u51e6\u7406\u3084\u30bd\u30fc\u30c8\u51e6\u7406\uff08JOIN\u306b\u3088\u308b\u6697\u9ed9\u30bd\u30fc\u30c8\u306a\u3069\uff09\u3092\u7591\u3044\u307e\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff12\uff0eSQL ordered by Elapsed<\/h2>\n<p>SQL\u304cElapse Time\u306e\u9577\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u51e6\u7406\u6642\u9593\u304c\u9577\u3044\u3068\u3044\u3046\u3053\u3068\u306f\u30ea\u30bd\u30fc\u30b9\u3092\u9577\u304f\u3001\u591a\u304f\u6d88\u8cbb\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u307e\u305a\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u5bfe\u8c61\u3068\u8003\u3048\u307e\u3059<\/p>\n<p>\u30bd\u30fc\u30c8\u51e6\u7406\uff08JOIN\u306b\u3088\u308b\u6697\u9ed9\u30bd\u30fc\u30c8\u7b49\u3092\u542b\u3080\uff09\u3084\u30d5\u30a1\u30a4\u30ebI\/O\u304c\u591a\u3044\u304b\u3001\u30e9\u30c3\u30c1\u7af6\u5408\u306f\u767a\u751f\u3057\u3066\u3044\u306a\u3044\u304b\u3092\u7591\u3044\u307e\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff13\uff0eSQL ordered by Gets<\/h2>\n<p>SQL\u304c\u30d0\u30c3\u30d5\u30a1\u8aad\u8fbc\uff08\u6240\u8b02LOGICAL\u3000READ\u3067\u3059\uff09\u306e\u591a\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u30d0\u30c3\u30d5\u30a1\u53d6\u5f97\u304c\u591a\u3044\u3068\u3044\u3046\u3053\u3068\u306f\u30e9\u30c3\u30c1\u7af6\u5408\u306e\u539f\u56e0\u3068\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u30e9\u30c3\u30c1\u7af6\u5408\u304c\u51fa\u3066\u3044\u308b\u5834\u5408\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u5bfe\u8c61\u3068\u8003\u3048\u307e\u3059<\/p>\n<p>Segments by Logical Reads\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u30c6\u30fc\u30d6\u30eb\u3084\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff09\u3068SQL\u304c\u305d\u308c\u3089\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u3089\u8981\u6ce8\u610f\u3067\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff14\uff0eSQL ordered by Reads<\/h2>\n<p>SQL\u304cDISK\uff08\u7269\u7406\uff09\u8aad\u8fbc\uff08\u6240\u8b02PHYSICAL\u3000READ)\u306e\u591a\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u904e\u5270\u306aI\/O\u306fCBLC\u30e9\u30c3\u30c1\u7af6\u5408\u306e\u9060\u56e0\u3068\u306a\u308b\u53ef\u80fd\u6027\u304c\u5927\u304d\u3044\u306e\u3067\u3001\u30e9\u30c3\u30c1\u7af6\u5408\u304c\u51fa\u3066\u3044\u308b\u5834\u5408\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u5bfe\u8c61\u3068\u8003\u3048\u307e\u3059<\/p>\n<p>Segments by Physical Reads\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u30c6\u30fc\u30d6\u30eb\u3084\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff09\u3068SQL\u304c\u305d\u308c\u3089\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u3089\u8981\u6ce8\u610f\u3067\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff15\uff0eSQL ordered by Executions<\/h2>\n<p>SQL\u304c\u5b9f\u884c\u56de\u6570\u306e\u591a\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u983b\u7e41\u306b\u5b9f\u884c\u3055\u308c\u308bSQL\u306f\u3001\u5168\u4f53\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u6700\u3082\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u305f\u3081\u3001\u6700\u521d\u304b\u3089\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u5bfe\u8c61\u3068\u8003\u3048\u307e\u3059<\/p>\n<p>\u5b9f\u884c\u56de\u6570\u304c\u59a5\u5f53\u304b\u3092\u5206\u6790\u3057\u307e\u3059<\/p>\n<p>\u7279\u306b\u3001CPU\u8ca0\u8377\u304c\u9ad8\u3044\u3068\u304b\u3001Elapse Time\u304c\u9577\u3044\u3068\u3053\u308d\u306b\u3082\u51fa\u73fe\u3057\u3066\u3044\u308bSQL\u306f\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u5bfe\u8c61\u3067\u3059<\/p>\n<p>\u5b9f\u884c\u56de\u6570\u304c\u591a\u3044\u306e\u3067\u3001\u5c11\u3057\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3067\u52b9\u679c\u304c\u5927\u304d\u3044\u5834\u5408\u3082\u3042\u308a\u307e\u3059\uff08\u5875\u3082\u7a4d\u3082\u308c\u3070\u4f55\u3068\u3084\u3089\u3067\u3059\uff09<\/p>\n<p>&nbsp;<\/p>\n<h2>\uff16\uff0eSQL ordered by Parse Calls<\/h2>\n<p>SQL\u304c\u89e3\u6790\u56de\u6570\u306e\u591a\u3044\u9806\u306b\u8868\u793a\u3055\u308c\u307e\u3059<\/p>\n<p>\u30cf\u30fc\u30c9\u30d1\u30fc\u30b9\u306e\u6642\u9593\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4f7f\u7528\u306a\u3069\u7121\u99c4\u306a\u30ea\u30bd\u30fc\u30b9\u4f7f\u7528\u306e\u539f\u56e0\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u4ed6\u306e\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3088\u308a\u512a\u5148\u5ea6\u306f\u4f4e\u304f\u306a\u308a\u307e\u3059\u304c\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u5bfe\u8c61\u3068\u8003\u3048\u3066\u304a\u304d\u307e\u3059<\/p>\n<p>SQL\u306e\u69cb\u6587\u306e\u554f\u984c\u306e\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04\u3084\u30d0\u30a4\u30f3\u30c9\u5909\u6570\u5316\u3084PL\/SQL\u5316\u306a\u3069SQL\u306e\u4f5c\u308a\u306b\u554f\u984c\u306f\u306a\u3044\u304b\u3092\u5206\u6790\u3057\u307e\u3059<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u30dd\u30a4\u30f3\u30c8<\/h2>\n<p>STATSPACK\u306eSQL order\u3000by\u3000XXX\u306e\u9805\u76ee\u5024\u306e\u307e\u3068\u3081\u3068\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059<\/p>\n<p><a href=\"http:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-713\" src=\"http:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis.png\" alt=\"\" width=\"1332\" height=\"747\" srcset=\"https:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis.png 1332w, https:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis-300x168.png 300w, https:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis-768x431.png 768w, https:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis-1024x574.png 1024w, https:\/\/fulfillment-c.com\/database\/wp-content\/uploads\/sql-analysis-270x151.png 270w\" sizes=\"(max-width: 1332px) 100vw, 1332px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"post-excerpt\"><p>STATSPACK\u3092\u4f7f\u7528\u3057\u305fSQL\u5206\u6790<\/p>\n<\/div>","protected":false},"author":1,"featured_media":713,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[10],"_links":{"self":[{"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/posts\/712"}],"collection":[{"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/comments?post=712"}],"version-history":[{"count":7,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/posts\/712\/revisions"}],"predecessor-version":[{"id":746,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/posts\/712\/revisions\/746"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/media\/713"}],"wp:attachment":[{"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/media?parent=712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/categories?post=712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fulfillment-c.com\/database\/wp-json\/wp\/v2\/tags?post=712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}