{"id":21018,"date":"2026-08-26T11:48:58","date_gmt":"2026-08-26T09:48:58","guid":{"rendered":"https:\/\/webhosting.de\/mysql-histograms-bessere-query-plaene-ohne-index-optimizer\/"},"modified":"2026-08-26T11:48:58","modified_gmt":"2026-08-26T09:48:58","slug":"mysql%e3%81%ae%e3%83%92%e3%82%b9%e3%83%88%e3%82%b0%e3%83%a9%e3%83%a0%ef%bc%9a%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%aa%e3%83%97%e3%83%86%e3%82%a3%e3%83%9e%e3%82%a4%e3%82%b6","status":"publish","type":"post","link":"https:\/\/webhosting.de\/ja\/mysql-histograms-bessere-query-plaene-ohne-index-optimizer\/","title":{"rendered":"MySQL\u306e\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0 \u2013 \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306a\u3057\u3067\u3082\u3088\u308a\u826f\u3044\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\u3092\u4f5c\u6210\u3059\u308b"},"content":{"rendered":"<p><strong>MySQL\u306e\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0<\/strong> \u3053\u308c\u306b\u3088\u308a\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u5b9f\u969b\u306e\u5206\u5e03\u30c7\u30fc\u30bf\u304c\u63d0\u4f9b\u3055\u308c\u3001\u9078\u629e\u6027\u3092\u6b63\u78ba\u306b\u63a8\u5b9a\u3057\u3066\u3001\u3088\u308a\u9ad8\u901f\u306a\u30af\u30a8\u30ea\u30fc\u30d7\u30e9\u30f3\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u591a\u304f\u306e\u5834\u5408\u3001\u8ffd\u52a0\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306a\u3057\u3067\u3053\u308c\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u3001MySQL 8\u4ee5\u964d\u3067ANALYZE TABLE\u3092\u4f7f\u7528\u3057\u3066\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u8a2d\u5b9a\u30fb\u78ba\u8a8d\u3057\u3001\u7d50\u5408\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3001\u30b9\u30ad\u30e3\u30f3\u306b\u304a\u3051\u308b\u3088\u308a\u9069\u5207\u306a\u5224\u65ad\u306b\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002.<\/p>\n\n<h2>\u4e2d\u5fc3\u70b9<\/h2>\n<p><strong>\u30b7\u30e7\u30fc\u30c8\u30d5\u30a9\u30fc\u30ab\u30b9<\/strong>: \u4ee5\u4e0b\u306e\u8981\u70b9\u3067\u306f\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u79c1\u304c\u7279\u306b\u6ce8\u610f\u3057\u3066\u3044\u308b\u70b9\u3092\u793a\u3057\u307e\u3059\u3002.<\/p>\n<ul>\n  <li><strong>\u9078\u629e\u6027<\/strong> \u300c\u76f4\u611f\u300d\u3067\u306f\u306a\u304f\uff1a\u3088\u308a\u73fe\u5b9f\u7684\u306a\u30ab\u30fc\u30c7\u30a3\u30ca\u30ea\u30c6\u30a3\u63a8\u5b9a<\/li>\n  <li><strong>\u7d22\u5f15\u306a\u3057<\/strong> \u3088\u308a\u9ad8\u901f\uff1a\u504f\u3063\u305f\u5206\u5e03\u306b\u304a\u3051\u308b\u6700\u9069\u306a\u8a08\u753b\u306e\u9078\u629e<\/li>\n  <li><strong>\u30bf\u30a4\u30d7<\/strong> \u7406\u89e3\u3059\u308b\uff1a\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u3068\u7b49\u9ad8\u7dda\u3092\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u9069\u5207\u306b\u6d3b\u7528\u3059\u308b<\/li>\n  <li><strong>\u30d0\u30b1\u30c3\u30c8<\/strong> \u7a0e\u5236\uff1a\u30e1\u30bf\u30c7\u30fc\u30bf\u30b3\u30b9\u30c8\u3068\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8003\u616e\u3057\u305f\u89e3\u6d88\u7b56<\/li>\n  <li><strong>\u30b1\u30a2<\/strong> \u6ce8\u76ee\u30dd\u30a4\u30f3\u30c8\uff1a\u66f4\u65b0\u3001\u78ba\u8a8d\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u524a\u9664<\/li>\n<\/ul>\n\n<h2>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u306a\u3044\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u306a\u305c\u52b9\u679c\u7684\u304b<\/h2>\n<p>\u79c1\u306f\u3053\u3046\u3057\u3066\u3044\u308b\u3002 <strong>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0<\/strong>, \u3001\u305d\u3046\u3057\u306a\u3044\u3068\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f\u3057\u3070\u3057\u3070\u4e00\u69d8\u5206\u5e03\u3092\u524d\u63d0\u3068\u3057\u3066\u3057\u307e\u3044\u3001\u305d\u306e\u7d50\u679c\u3001\u4e0d\u9069\u5207\u306a\u5b9f\u884c\u8a08\u753b\u3092\u9078\u629e\u3057\u3066\u3057\u307e\u3046\u305f\u3081\u3067\u3042\u308b\u3002\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001 <strong>\u5024\u306e\u5206\u5e03<\/strong> \u3042\u308b\u5217\u3092\u8fd1\u4f3c\u7684\u306b\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u305d\u308c\u306b\u3088\u3063\u3066 =\u3001&gt;\u3001BETWEEN\u3001IN\u3001IS NULL \u3068\u3044\u3063\u305f\u8ff0\u8a9e\u306b\u5bfe\u3057\u3066\u73fe\u5b9f\u7684\u306a\u9078\u629e\u6027\u306e\u63a8\u5b9a\u5024\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u57fa\u3065\u304d\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30fb\u30ec\u30f3\u30b8\u30fb\u30b9\u30ad\u30e3\u30f3\u3001\u30c6\u30fc\u30d6\u30eb\u30fb\u30b9\u30ad\u30e3\u30f3\u3001\u3042\u308b\u3044\u306f\u30cd\u30b9\u30c8\u30eb\u30fc\u30d7\u306b\u3088\u308b\u7d50\u5408\u6226\u7565\u306e\u3069\u308c\u304c\u6700\u9069\u304b\u3092\u5224\u65ad\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u3042\u308b\u6761\u4ef6\u304c\u5168\u884c\u306e\u308f\u305a\u304b0.1%\u306b\u3057\u304b\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u5834\u5408\u3001\u5e83\u7bc4\u56f2\u306a\u30b9\u30ad\u30e3\u30f3\u3067\u306f\u306a\u304f\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u7d5e\u3063\u305f\u30a2\u30af\u30bb\u30b9\u3092\u512a\u5148\u3057\u307e\u3059\u3002 \u4e00\u65b9\u3001\u30d5\u30a3\u30eb\u30bf\u306b\u3088\u3063\u3066\u307b\u307c\u3059\u3079\u3066\u306e\u884c\u304c\u5bfe\u8c61\u3068\u306a\u308b\u5834\u5408\u306f\u3001\u30e1\u30ea\u30c3\u30c8\u306e\u306a\u3044\u30b3\u30b9\u30c8\u306e\u304b\u304b\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30a2\u30af\u30bb\u30b9\u306f\u884c\u308f\u305a\u3001\u305d\u308c\u306b\u3088\u3063\u3066 <strong>\u52b9\u7387\u6027<\/strong> \u3059\u3079\u3066\u306e\u8a08\u753b\u306b\u304a\u3044\u3066\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql-query-histograms-6793.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>MySQL 8.0 \u306e\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u7a2e\u985e<\/h2>\n<p>\u79c1\u306f2\u3064\u306b\u533a\u5225\u3057\u3066\u3044\u308b <strong>\u30bf\u30a4\u30d7<\/strong>: \u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u3068\u30a4\u30ad\u30cf\u30a4\u30c8\u3002\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30fb\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u983b\u7e41\u306b\u73fe\u308c\u308b\u5358\u4e00\u306e\u5024\u3092\u5225\u3005\u306e\u30d0\u30b1\u30c3\u30c8\u306b\u307e\u3068\u3081\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u300c\u30a2\u30af\u30c6\u30a3\u30d6\u300d\u3001\u300c\u975e\u30a2\u30af\u30c6\u30a3\u30d6\u300d\u3001\u300c\u30a2\u30fc\u30ab\u30a4\u30d6\u300d\u306a\u3069\u3001\u652f\u914d\u7684\u306a\u30ab\u30c6\u30b4\u30ea\u304c\u5c11\u306a\u3044\u5217\u306b\u6700\u9069\u3067\u3059\u3002 Equi-Height\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u5404\u30d0\u30b1\u30c3\u30c8\u306b\u307b\u307c\u540c\u6570\u306e\u5024\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u3088\u3046\u306b\u5024\u306e\u7bc4\u56f2\u3092\u5206\u5272\u3057\u307e\u3059\u3002 <strong>\u30e9\u30a4\u30f3<\/strong> \u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u4fa1\u683c\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3001\u3042\u308b\u3044\u306f\u300c\u7a74\u306e\u3042\u308b\u300dID\u7bc4\u56f2\u306a\u3069\u3001\u9023\u7d9a\u7684\u307e\u305f\u306f\u4e0d\u898f\u5247\u306a\u5206\u5e03\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u3069\u3061\u3089\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3082\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306b\u5bfe\u3057\u3066\u30d5\u30a3\u30eb\u30bf\u306e\u30d2\u30c3\u30c8\u7387\u3092\u3088\u308a\u6b63\u78ba\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002\u79c1\u306f\u5e38\u306b\u3001\u500b\u4eba\u7684\u306a\u597d\u307f\u3067\u306f\u306a\u304f\u3001\u30c7\u30fc\u30bf\u306e\u7279\u6027\u306b\u57fa\u3065\u3044\u3066\u30bf\u30a4\u30d7\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059\u3002.<\/p>\n\n<h2>\u6280\u8853\u7684\u306a\u57fa\u790e\uff1aMySQL\u306b\u304a\u3051\u308b\u30bf\u30a4\u30d7\u9078\u629e\u306e\u5236\u5fa1<\/h2>\n<p>MySQL\u304c\u5177\u4f53\u7684\u306a <strong>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3<\/strong> \u30c7\u30fc\u30bf\u306e\u5206\u5e03\u306b\u57fa\u3065\u3044\u3066\u81ea\u52d5\u7684\u306b\u6c7a\u5b9a\u3055\u308c\u307e\u3059\u3002\u5b9f\u969b\u306b\u306f\u3001\u7570\u306a\u308b\u5024\u306e\u6570\uff08NDV\uff09\u304c\u30d0\u30b1\u30c3\u30c8\u6570\u306b\u6bd4\u3079\u3066\u5341\u5206\u306b\u5c11\u306a\u3044\u5834\u5408\u3001\u5b9f\u8cea\u7684\u306b\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u7b49\u9ad8\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u79c1\u306f\u305d\u306e\u30bf\u30a4\u30d7\u3092\u300c\u9078\u629e\u300d\u3057\u307e\u3059 <em>\u9593\u63a5\u7684<\/em>, \u9069\u5207\u306a\u5217\u3068\u9069\u5207\u306a\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3002 \u30ab\u30c6\u30b4\u30ea\u306e\u6570\u306f\u975e\u5e38\u306b\u5c11\u306a\u3044\u3082\u306e\u306e\u3001\u7279\u5b9a\u306e\u30ab\u30c6\u30b4\u30ea\u304c\u5727\u5012\u7684\u306b\u591a\u3044\u5217\u306b\u3064\u3044\u3066\u306f\u3001\u305d\u308c\u3089\u306e\u5024\u306b\u5bfe\u3057\u3066\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u4e26\u307f\u306e\u7cbe\u5ea6\u304c\u5f97\u3089\u308c\u308b\u3088\u3046\u3001\u610f\u56f3\u7684\u306b\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u5c11\u306a\u304f\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5206\u5e03\u304c\u7d30\u304b\u304f\u3001\u9023\u7d9a\u7684\u306a\u30c7\u30fc\u30bf\u306e\u5834\u5408\u306f\u3001EXPLAIN\u304c\u5e0c\u671b\u3059\u308b <strong>\u9078\u629e\u6027<\/strong> \u3092\u53cd\u6620\u3057\u3066\u3044\u308b\u3002.<\/p>\n<p>\u91cd\u8981\uff1a\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3068\u306f <strong>1\u6bb5\u7d44<\/strong>. \u5217\u9593\u306e\u4f9d\u5b58\u95a2\u4fc2\uff08\u4f8b\uff1astatus \u3068 country\uff09\u3092\u76f4\u63a5\u8868\u73fe\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3001\u6700\u3082\u9078\u629e\u6027\u306e\u9ad8\u3044\u5217\u306b\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u7d50\u5408\u9806\u5e8f\u3092\u8abf\u6574\u3059\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002.<\/p>\n\n<h2>\u30d0\u30b1\u30c3\u30c8\u306e\u6b63\u3057\u3044\u9078\u3073\u65b9<\/h2>\n<p>MySQL\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067100\u3092\u4f7f\u7528\u3057\u307e\u3059 <strong>\u30d0\u30b1\u30c3\u30c8<\/strong>, \u3001\u305f\u3060\u3057 WITH N BUCKETS \u3092\u4f7f\u7528\u3059\u308c\u3070 1 \u304b\u3089 1024 \u307e\u3067\u6307\u5b9a\u53ef\u80fd\u3067\u3059\u3002\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u5897\u3084\u3059\u3068\u89e3\u50cf\u5ea6\u306f\u5411\u4e0a\u3057\u307e\u3059\u304c\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u91cf\u3068\u5206\u6790\u8ca0\u8377\u3082\u5897\u5927\u3057\u307e\u3059\u3002\u79c1\u306f\u901a\u5e38\u3001\u63a7\u3048\u3081\u306a\u8a2d\u5b9a\u304b\u3089\u59cb\u3081\u3001EXPLAIN \u3067\u306e\u5f71\u97ff\u3092\u6e2c\u5b9a\u3057\u3001\u5b9f\u884c\u8a08\u753b\u304c\u4f9d\u7136\u3068\u3057\u3066\u4e0d\u9069\u5207\u3068\u601d\u308f\u308c\u308b\u5834\u5408\u306b\u6bb5\u968e\u7684\u306b\u5897\u3084\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u5024\u304c\u96c6\u4e2d\u3057\u3066\u3044\u308b\u5834\u5408\uff08\u4f8b\uff1a90\u4ef6\u304c%\u3068\u3044\u3046\u30b9\u30c6\u30fc\u30bf\u30b9\uff09\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u5c11\u6570\u306e\u30d0\u30b1\u30c3\u30c8\u3067\u5341\u5206\u3067\u3059\u3002\u4e00\u65b9\u3001\u4fa1\u683c\u3084\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u7d30\u304b\u304f\u5206\u6563\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u5897\u3084\u3059\u4fa1\u5024\u304c\u3042\u308a\u307e\u3059\u3002\u76ee\u6a19\u306f\u3001\u9069\u5207\u306a <strong>\u7c92\u5ea6<\/strong>, \u3001\u7ba1\u7406\u4e0a\u306e\u8ca0\u62c5\u3092\u4e0d\u5fc5\u8981\u306b\u5897\u3084\u3059\u3053\u3068\u306a\u304f\u3001\u8aa4\u5224\u65ad\u3092\u8457\u3057\u304f\u6e1b\u3089\u3057\u305f\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql_histogramm_meeting_8123.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>\u5b9f\u8df5\uff1aANALYZE TABLE \u3092\u4f7f\u7528\u3057\u305f\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/h2>\n<p>\u79c1\u306f\u660e\u78ba\u306a\u65b9\u91dd\u306b\u5f93\u3063\u3066\u3044\u307e\u3059 <strong>\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/strong>: \u307e\u305a\u3001WHERE\u53e5\u3084JOIN\u6761\u4ef6\u306b\u3088\u304f\u767b\u5834\u3057\u3001\u660e\u3089\u304b\u306b\u504f\u3063\u305f\u5206\u5e03\u3092\u793a\u3057\u3066\u3044\u308b\u5217\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001`ANALYZE TABLE tbl UPDATE HISTOGRAM ON col WITH N BUCKETS;` \u3092\u4f7f\u7528\u3057\u3066\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u751f\u6210\u3057\u3001`INFORMATION_SCHEMA.COLUMN_STATISTICS` \u3092\u901a\u3058\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u306e\u79fb\u52d5\u5f8c\u306f\u3001ANALYZE TABLE \u3092\u4f7f\u7528\u3057\u3066\u518d\u5ea6\u66f4\u65b0\u3057\u307e\u3059\u3002\u7d71\u8a08\u60c5\u5831\u304c\u9069\u5207\u3067\u306a\u3044\u5834\u5408\u306f\u3001ANALYZE TABLE tbl DROP HISTOGRAM ON col; \u3092\u5b9f\u884c\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002\u5b9f\u884c\u8a08\u753b\u306e\u52b9\u679c\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 <a href=\"https:\/\/webhosting.de\/ja\/mysql%e3%81%aeexplain%e3%83%bbanalyze%e3%81%ab%e3%82%88%e3%82%8b%e3%82%af%e3%82%a8%e3%83%aa%e3%81%ae%e8%a7%a3%e6%9e%90%e3%81%a8%e3%82%af%e3%82%a8%e3%83%aa%e3%83%81%e3%83%a5%e3%83%bc%e3%83%8b%e3%83%b3\/\">EXPLAIN ANALYZE \u306e\u89e3\u91c8<\/a> \u304a\u3088\u3073\u63a8\u5b9a\u5024\u3068\u5b9f\u7e3e\u5024\u306e\u6bd4\u8f03 <strong>\u30e9\u30a4\u30f3<\/strong> \u3088\u308a\u3002<\/p>\n\n<h2>\u5177\u4f53\u7684\u306a\u6307\u793a\u3068\u7ba1\u7406<\/h2>\n<p>\u79c1\u306f\u3001\u660e\u78ba\u3067\u5c11\u306a\u3044\u624b\u9806\u306b\u5f93\u3063\u3066\u518d\u73fe\u6027\u306e\u3042\u308b\u65b9\u6cd5\u3067\u4f5c\u696d\u3092\u884c\u3044\u3001\u751f\u6210\u3055\u308c\u305fJSON\u7d71\u8a08\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002.<\/p>\n<pre><code>-- \u500b\u3005\u306e\u5217\u306b\u5bfe\u3057\u3066\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\nANALYZE TABLE orders UPDATE HISTOGRAM ON status WITH 32 BUCKETS;\nANALYZE TABLE orders UPDATE HISTOGRAM ON created_at WITH 128 BUCKETS;\n\n-- 1\u56de\u306e\u5b9f\u884c\u3067\u8907\u6570\u306e\u5217\u306b\u540c\u3058\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u8a2d\u5b9a\nANALYZE TABLE orders UPDATE HISTOGRAM ON status, payment_method WITH 64 BUCKETS;\n\n-- \u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u7279\u5b9a\u3057\u3066\u524a\u9664\nANALYZE TABLE orders DROP HISTOGRAM ON status;\n<\/code><\/pre>\n<pre><code>-- \u7d71\u8a08\u60c5\u5831\u306e\u76ee\u8996\u78ba\u8a8d\nSELECT\n  SCHEMA_NAME, TABLE_NAME, COLUMN_NAME,\n  JSON_PRETTY(HISTOGRAM) AS histogram\nFROM INFORMATION_SCHEMA.COLUMN_STATISTICS\nWHERE SCHEMA_NAME = DATABASE()\n  AND TABLE_NAME = 'orders'\n  AND COLUMN_NAME IN ('status','created_at');\n<\/code><\/pre>\n<p>EXPLAIN ANALYZE \u3092\u4f7f\u3063\u3066\u3001\u305d\u306e\u52b9\u679c\u3092\u5373\u5ea7\u306b\u8a55\u4fa1\u3057\u307e\u3059\uff1a<\/p>\n<pre><code>EXPLAIN ANALYZE\nSELECT *\nFROM orders\nWHERE status = 'canceled'\n  AND created_at &gt;= NOW() - INTERVAL 7 DAY;\n<\/code><\/pre>\n<p>\u63a8\u5b9a\u5024\u306f\u6539\u5584\u3055\u308c\u308b\u304b <strong>\u884c<\/strong> \u9855\u8457\u306a\u5909\u5316\u304c\u898b\u3089\u308c\u3001\u4f8b\u3048\u3070\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30fb\u30ec\u30f3\u30b8\u30fb\u30b9\u30ad\u30e3\u30f3\u3078\u3068\u8a08\u753b\u304c\u5909\u66f4\u3055\u308c\u305f\u308a\u3001\u7d50\u5408\u9806\u5e8f\u304c\u5909\u66f4\u3055\u308c\u305f\u308a\u3057\u305f\u5834\u5408\u306f\u3001\u305d\u306e\u5bfe\u7b56\u306f\u6210\u529f\u3057\u305f\u3068\u8a00\u3048\u307e\u3059\u3002\u5dee\u7570\u304c\u4f9d\u7136\u3068\u3057\u3066\u5927\u304d\u3044\u5834\u5408\u306f\u3001\u30d0\u30b1\u30c3\u30c8\u6570\u3092\u5897\u6e1b\u3055\u305b\u3066\u518d\u5ea6\u6bd4\u8f03\u3057\u307e\u3059\u3002.<\/p>\n\n<h2>\u4f8b\uff1a\u6ce8\u6587\u30b9\u30c6\u30fc\u30bf\u30b9\u3068\u7a00\u306a\u5024<\/h2>\n<p>\u6ce8\u6587\u30c6\u30fc\u30d6\u30eb\u3067\u306f\u3001\u300ccompleted\u300d\u3068\u3044\u3046\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\u5727\u5012\u7684\u306b\u591a\u304f\u3001\u300cpending\u300d\u306f\u4e2d\u7a0b\u5ea6\u306b\u591a\u304f\u3001\u300ccanceled\u300d\u306f\u6975\u3081\u3066\u7a00\u3067\u3042\u308b\u3002\u3053\u306e <strong>\u7d4c\u55b6\u96e3<\/strong> \u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u306a\u3044\u3068\u3001\u9078\u629e\u6027\u306e\u8aa4\u308a\u3092\u62db\u304d\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002API\u304c\u300ccanceled\u300d\u3092\u30af\u30a8\u30ea\u3059\u308b\u3068\u3001\u72ed\u3044\u7bc4\u56f2\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30a2\u30af\u30bb\u30b9\u3067\u5341\u5206\u306a\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u8aa4\u3063\u3066\u30d5\u30eb\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u9078\u629e\u3057\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001MySQL\u306f\u300ccanceled\u300d\u304c\u3054\u304f\u308f\u305a\u304b\u306a\u5272\u5408\u3057\u304b\u5360\u3081\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u8a8d\u8b58\u3057\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30fb\u30ec\u30f3\u30b8\u30fb\u30b9\u30ad\u30e3\u30f3\u306b\u5207\u308a\u66ff\u3048\u305f\u308a\u3001\u30b8\u30e7\u30a4\u30f3\u306e\u9806\u5e8f\u3092\u6700\u9069\u5316\u3057\u305f\u308a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u4f4e\u6e1b\u3055\u308c\u3001\u3059\u3079\u3066\u306e <strong>\u30d0\u30ea\u30a2\u30f3\u30c8<\/strong> \u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u3002\u53b3\u683c\u306aSLO\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3067\u306f\u3001\u3053\u306e\u4fee\u6b63\u306b\u3088\u3063\u3066\u53cd\u5fdc\u901f\u5ea6\u304c\u8457\u3057\u304f\u5411\u4e0a\u3059\u308b\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql-histograms-server-room-2973.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>\u6642\u7cfb\u5217\u3068\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7<\/h2>\n<p>\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306b\u306f\u591a\u304f\u306e <strong>\u30a2\u30af\u30bb\u30b9<\/strong> \u6700\u65b0\u306e\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u3066\u304a\u308a\u3001\u53e4\u3044\u6642\u9593\u67a0\u306f\u901a\u5e38\u3001\u307b\u3068\u3093\u3069\u4f7f\u7528\u3055\u308c\u306a\u3044\u3002created_at \u3084 updated_at \u306b\u57fa\u3065\u304f\u7b49\u9ad8\u7dda\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u30a2\u30af\u30bb\u30b9\u983b\u5ea6\u306e\u9ad8\u3044\u6642\u9593\u5e2f\u3068\u4f4e\u3044\u6642\u9593\u5e2f\u3092\u660e\u78ba\u306b\u533a\u5225\u3059\u308b\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f\u3001\u30ec\u30f3\u30b8\u30b9\u30ad\u30e3\u30f3\u304c\u9069\u5207\u304b\u3001\u305d\u308c\u3068\u3082\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u306e\u65b9\u304c\u3088\u308a\u8fc5\u901f\u306b\u7d50\u679c\u306b\u5230\u9054\u3067\u304d\u308b\u304b\u3092\u6b63\u78ba\u306b\u898b\u6975\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u7279\u306b\u3001\u5927\u898f\u6a21\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u90e8\u5206\u7684\u306a\u6642\u9593\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u9069\u7528\u3059\u308b\u5834\u5408\u3001\u5b9f\u884c\u8a08\u753b\u306e\u5927\u5e45\u306a\u5909\u66f4\u3068I\/O\u30b3\u30b9\u30c8\u306e\u4f4e\u6e1b\u304c\u9855\u8457\u306b\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u79c1\u306f\u3001 <strong>\u7d71\u8a08<\/strong> \u3053\u3053\u3067\u306f\u3001\u65e5\u3005\u306e\u696d\u52d9\u306b\u5408\u308f\u305b\u3066\u91cd\u70b9\u304c\u79fb\u308a\u5909\u308f\u308b\u305f\u3081\u3001\u3088\u308a\u983b\u7e41\u306b\u66f4\u65b0\u3055\u308c\u3066\u3044\u307e\u3059\u3002.<\/p>\n\n<h2>\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3001\u30c7\u30fc\u30bf\u578b\u3001\u304a\u3088\u3073\u7167\u5408\u9806\u5e8f<\/h2>\n<p>\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306b\u3064\u3044\u3066\u3001\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3092\u78ba\u8a8d\u3057\u307e\u3059 <strong>\u3059\u3079\u3066\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066<\/strong>. \u5927\u304d\u306a\u3070\u3089\u3064\u304d\uff08\u4f8b\u3048\u3070\u6708\u5358\u4f4d\u306a\u3069\uff09\u304c\u3042\u308b\u3068\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u5e73\u6ed1\u5316\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u500b\u3005\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u304c\u6975\u7aef\u306b\u9078\u629e\u7684\u3067\u3042\u308b\u304b\u3001\u3042\u308b\u3044\u306f\u6975\u7aef\u306b\u5e45\u304c\u5e83\u3044\u5834\u5408\u306f\u3001WHERE\u53e5\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30d7\u30eb\u30fc\u30cb\u30f3\u30b0\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u3001\u305d\u308c\u3067\u3082\u5b9f\u884c\u8a08\u753b\u306e\u54c1\u8cea\u304c\u9069\u5207\u304b\u3069\u3046\u304b\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002 \u5168\u4f53\u3068\u3057\u3066\u3001MySQL\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u65e9\u671f\u306b <strong>\u9664\u5916\u3059\u308b<\/strong> \u7f36\u3002<\/p>\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u30b9\u30ab\u30e9\u30fc\u578b\u3067\u6bd4\u8f03\u53ef\u80fd\u306a\u30c7\u30fc\u30bf\u578b\uff08\u6570\u5024\u3001\u65e5\u4ed8\u30fb\u6642\u523b\u3001\u9069\u5207\u306a\u7167\u5408\u9806\u5e8f\u304c\u8a2d\u5b9a\u3055\u308c\u305fVARCHAR\/CHAR\uff09\u3067\u6700\u3082\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u3059\u3002 <strong>LOB\uff0fJSON\u30c7\u30fc\u30bf<\/strong> \u79c1\u306f\u3069\u3061\u3089\u304b\u3068\u3044\u3048\u3070 <em>\u751f\u6210\u3055\u308c\u305f\u30b3\u30e9\u30e0<\/em> \u62bd\u51fa\u30fb\u578b\u6307\u5b9a\u3055\u308c\u305f\u5024\u3092\u7528\u3044\u3066\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3084\u6307\u6a19\u3092\u8ffd\u52a0\u3059\u308b\u3002\u6587\u5b57\u5217\u306e\u5834\u5408\u3001 <strong>\u7167\u5408<\/strong> \u6bd4\u8f03\u30ed\u30b8\u30c3\u30af\u3002\u7167\u5408\u9806\u5e8f\u306b\u3088\u3063\u3066\u306f\u3001\u5024\u304c\u4e00\u81f4\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff08\u4f8b\uff1a\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225\uff09\u3002\u73fe\u5b9f\u7684\u306a\u9078\u629e\u6027\u3092\u5f97\u308b\u305f\u3081\u3001\u30af\u30a8\u30ea\u3068\u7167\u5408\u9806\u5e8f\u3092\u4e00\u81f4\u3055\u305b\u3066\u3044\u307e\u3059\u3002.<\/p>\n\n<h2>\u9650\u754c\u3068\u5931\u6557<\/h2>\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u3068\u308a\u308f\u3051\u5358\u4e00\u306e\u5217\u306b\u3064\u3044\u3066 <strong>\u5b9a\u6570<\/strong> \u78ba\u304b\u306b\u3001\u591a\u5217\u9593\u306e\u4f9d\u5b58\u95a2\u4fc2\u306b\u3064\u3044\u3066\u306f\u3001\u9650\u3089\u308c\u305f\u7bc4\u56f2\u3067\u3057\u304b\u8868\u73fe\u3067\u304d\u307e\u305b\u3093\u3002\u76f8\u95a2\u306e\u5f37\u3044\u5217\u3084\u52d5\u7684\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\uff08\u4f8b\u3048\u3070\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u3067\u8a2d\u5b9a\u3055\u308c\u308b\u3082\u306e\uff09\u306e\u5834\u5408\u3001\u305d\u306e\u9650\u754c\u304c\u9732\u5448\u3057\u307e\u3059\u3002\u30d6\u30fc\u30eb\u578b\u30d5\u30a3\u30fc\u30eb\u30c9\u3084\u3001\u5206\u5e03\u304c\u307b\u307c\u5747\u4e00\u306a\u5217\u306b\u3064\u3044\u3066\u306f\u3001\u8ffd\u52a0\u306e\u7d71\u8a08\u60c5\u5831\u3092\u6d3b\u7528\u3057\u3066\u3082\u30e1\u30ea\u30c3\u30c8\u304c\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 \u4e00\u65b9\u3067\u3001\u30d0\u30b1\u30c3\u30c8\u6570\u304c\u591a\u3059\u304e\u305f\u308a\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u904e\u5ea6\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u3068\u3001\u7ba1\u7406\u3084\u5206\u6790\u306b\u304b\u304b\u308b\u6642\u9593\u304c\u5897\u52a0\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u79c1\u306f\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u9069\u5207\u306b\u6d3b\u7528\u3057\u3001\u5b9a\u671f\u7684\u306b <strong>\u52b9\u679c<\/strong> \u5b9f\u969b\u306e\u4ed5\u69d8\u306b\u57fa\u3065\u3044\u3066\u3002.<\/p>\n\n<h2>\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306e\u78ba\u8a8d\u3068\u66f4\u65b0<\/h2>\n<p>\u79c1\u306f\u305d\u308c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 <strong>\u7528\u9014<\/strong> \u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304b\u3089\u300eANALYZE TABLE\u300f\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fb\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u81f3\u308b\u307e\u3067\u3001\u30d7\u30e9\u30f3\u30ca\u30fc\u304c\u7d71\u8a08\u60c5\u5831\u3092\u9069\u5207\u306b\u6d3b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u8ca0\u8377\u306e\u9ad8\u3044\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u66f4\u65b0\u51e6\u7406\u3092\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u5c11\u306a\u3044\u6642\u9593\u5e2f\u306b\u884c\u3046\u304b\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30ed\u30fc\u30c9\u7d42\u4e86\u5f8c\u306b\u30d0\u30c3\u30c1\u51e6\u7406\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u8a08\u753b\u3057\u3066\u3044\u307e\u3059\u3002 \u66f4\u65b0\u306e\u524d\u5f8c\u3067\u3001EXPLAIN\u304a\u3088\u3073EXPLAIN ANALYZE\u306e\u51fa\u529b\u3092\u6bd4\u8f03\u3057\u3001\u5909\u66f4\u3055\u308c\u305f\u7d50\u5408\u9806\u5e8f\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30b9\u30c6\u30c3\u30d7\u3001\u304a\u3088\u3073\u30b3\u30b9\u30c8\u30e2\u30c7\u30eb\u3092\u8a55\u4fa1\u3057\u307e\u3059\u3002\u60aa\u5f71\u97ff\u304c\u78ba\u8a8d\u3055\u308c\u305f\u5834\u5408\u306f\u76f4\u3061\u306b\u5bfe\u5fdc\u3057\u3001\u7d71\u8a08\u60c5\u5831\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u307e\u3059\u3002\u3055\u3089\u306a\u308b\u5236\u5fa1\u306b\u3064\u3044\u3066\u306f\u3001 <a href=\"https:\/\/webhosting.de\/ja\/mysql-%e3%82%aa%e3%83%97%e3%83%86%e3%82%a3%e3%83%9e%e3%82%a4%e3%82%b6-%e3%82%af%e3%82%a8%e3%83%aa-%e3%83%9b%e3%82%b9%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0-%e6%9c%80%e9%81%a9%e5%8c%96-serverboost\/\">\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306e\u30aa\u30d7\u30b7\u30e7\u30f3<\/a> \u4ed6\u306e\u7d71\u8a08\u5024\u3068\u306e\u95a2\u9023\u6027\u306b\u3088\u3063\u3066\u3001\u6c17\u3065\u304b\u308c\u306a\u3044\u3046\u3061\u306b\u8aa4\u3063\u305f\u7d50\u679c\u304c <strong>\u524d\u63d0\u6761\u4ef6<\/strong> \u751f\u6210\u3059\u308b\u3002.<\/p>\n\n<h2>\u76e3\u8996\u3001\u56de\u5e30\u9632\u6b62\u3001\u304a\u3088\u3073\u30d7\u30ec\u30a4\u30d6\u30c3\u30af<\/h2>\n<p>\u79c1\u306f\u8efd\u91cf\u306a\u3082\u306e\u3092\u81ea\u4f5c\u3057\u3066\u3044\u307e\u3059 <strong>\u30d7\u30ec\u30a4\u30d6\u30c3\u30af<\/strong> \u672c\u756a\u904b\u7528\u306b\u3064\u3044\u3066\u306f\uff1a<\/p>\n<ul>\n  <li>\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a\uff1a\u5909\u66f4\u3092\u884c\u3046\u524d\u306b\u3001EXPLAIN ANALYZE\u3001\u5b9f\u884c\u6642\u9593\u3001\u300crows examined\u300d\u3001\u30cf\u30f3\u30c9\u30e9\u30ab\u30a6\u30f3\u30bf\u30fc\u3092\u8a18\u9332\u3057\u3066\u304a\u304f\u3002.<\/li>\n  <li>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u4f5c\u6210\u30fb\u5909\u66f4\uff1a\u30d5\u30a3\u30eb\u30bf\u5217\u3092\u91cd\u70b9\u7684\u306b\u8a2d\u5b9a\u3057\u3001\u30d0\u30b1\u30c3\u30c8\u306f\u63a7\u3048\u3081\u306b\u8a2d\u5b9a\u3059\u308b\u3002.<\/li>\n  <li>\u305d\u306e\u76f4\u5f8c\u306b\u6e2c\u5b9a\u3092\u884c\u3046\uff1a\u8a08\u753b\u5024\u3001\u63a8\u5b9a\u5024\u3068\u5b9f\u7e3e\u5024\u306e\u884c\u6570\u3092\u6bd4\u8f03\u3002\u4e56\u96e2\u7387\u304c10\u500d\u3092\u8d85\u3048\u308b\u5834\u5408\u306f\u3001\u79c1\u306b\u3068\u3063\u3066\u306f\u8b66\u544a\u30b5\u30a4\u30f3\u3068\u306a\u308b\u3002.<\/li>\n  <li>\u5fae\u8abf\u6574\uff1a\u30d0\u30b1\u30c3\u30c8\u3092\u4e0a\u4e0b\u306b\u8abf\u6574\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30af\u30a8\u30ea\u5185\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u9806\u5e8f\u3092\u8abf\u6574\u3057\u307e\u3059\u3002.<\/li>\n  <li>\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u306e\u6e96\u5099\u3092\u3057\u3066\u304a\u304f\uff1a\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u5897\u52a0\u3057\u305f\u5834\u5408\u306f\u3001DROP HISTOGRAM\u3092\u5b9f\u884c\u3059\u308b\u3002.<\/li>\n  <li>\u81ea\u52d5\u5316\uff1aETL\u30ed\u30fc\u30c9\u3084\u5927\u898f\u6a21\u306aDML\u51e6\u7406\u306e\u5f8c\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30a6\u30a3\u30f3\u30c9\u30a6\u5185\u3067ANALYZE\u3092\u5b9f\u884c\u3059\u308b\u3002.<\/li>\n<\/ul>\n<p>\u539f\u56e0\u5206\u6790\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3092\u7528\u3044\u3066\u3044\u307e\u3059 <strong>\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306e\u30c8\u30ec\u30fc\u30b9<\/strong> \u307e\u305f\u3001EXPLAIN ANALYZE \u3092\u4f7f\u7528\u3057\u3066\u3001\u30d7\u30e9\u30f3\u30ca\u30fc\u304c\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306b\u57fa\u3065\u3044\u3066\u9069\u5207\u306a\u9078\u629e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u300c\u512a\u5148\u300d\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 A\/B\u30c6\u30b9\u30c8\u3067\u306f\u3001\u7d71\u8a08\u60c5\u5831\u306e\u5f71\u97ff\u3092\u500b\u5225\u306b\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306b\u3001\u8a66\u3057\u306b\u7d50\u5408\u9806\u5e8f\uff08STRAIGHT_JOIN\uff09\u3092\u56fa\u5b9a\u3057\u305f\u308a\u3001\u500b\u3005\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u3092\u5f37\u5236\u30fb\u7981\u6b62\u3057\u305f\u308a\u3057\u3066\u3044\u307e\u3059\u3002.<\/p>\n<p>\u904b\u55b6\u9762\u3067\u306f\u3001\u77ed\u3044\u3082\u306e\u304c\u6709\u52b9\u3067\u3042\u308b\u3053\u3068\u304c\u5b9f\u8a3c\u3055\u308c\u3066\u3044\u308b <strong>\u5909\u66f4\u30ed\u30b0<\/strong> \u5404\u30c6\u30fc\u30d6\u30eb\u306b\u3064\u304d\uff1a\u5217\u3001\u30d0\u30b1\u30c3\u30c8\u6570\u3001\u6642\u70b9\u3001\u5909\u66f4\u524d\uff0f\u5909\u66f4\u5f8c\u306e\u6e2c\u5b9a\u5024\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5f8c\u65e5\u306e\u4fee\u6b63\u304c\u5bb9\u6613\u306b\u306a\u308a\u3001\u4e0d\u660e\u78ba\u306a\u76f8\u4e92\u4f5c\u7528\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql_histogram_techoffice_4829.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>\u904b\u7528\u4e0a\u306e\u5074\u9762\uff1a\u30ed\u30c3\u30af\u3001\u30b3\u30b9\u30c8\u3001\u30dd\u30fc\u30bf\u30d3\u30ea\u30c6\u30a3<\/h2>\n<p>ANALYZE TABLE \u306f <strong>\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u30ed\u30c3\u30af<\/strong> \u30c6\u30fc\u30d6\u30eb\u4e0a\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u304c\u3001\u901a\u5e38\u306e\u8aad\u307f\u53d6\u308a\uff0f\u66f8\u304d\u8fbc\u307f\u64cd\u4f5c\u3092\u6052\u4e45\u7684\u306b\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u975e\u5e38\u306b\u5927\u898f\u6a21\u306a\u30c6\u30fc\u30d6\u30eb\u306e\u5834\u5408\u306f\u3001\u5341\u5206\u306a\u6642\u9593\u3092\u78ba\u4fdd\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u751f\u6210\u306f\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u306b\u57fa\u3065\u3044\u3066\u884c\u308f\u308c\u3001\u30e1\u30e2\u30ea\u306b\u5236\u9650\u304c\u3042\u308a\u307e\u3059\uff08\u30ad\u30fc\u30ef\u30fc\u30c9\uff1a\u8a08\u7b97\u7528\u306e\u5185\u90e8\u30e1\u30e2\u30ea\uff09\u3002 \u7d71\u8a08\u30c7\u30fc\u30bf\u81ea\u4f53\u306e\u5360\u6709\u5bb9\u91cf\u306f\u305d\u308c\u307b\u3069\u5927\u304d\u304f\u3042\u308a\u307e\u305b\u3093\u3002100\uff5e256\u500b\u306e\u30d0\u30b1\u30c3\u30c8\u3092\u6301\u3064\u52171\u3064\u3042\u305f\u308a\u3001\u6570\u5341\u30ad\u30ed\u30d0\u30a4\u30c8\u304b\u3089\u6570\u767e\u30ad\u30ed\u30d0\u30a4\u30c8\u7a0b\u5ea6\u304c\u73fe\u5b9f\u7684\u306a\u76ee\u5b89\u3067\u3059\u3002\u3068\u306f\u3044\u3048\u3001\u591a\u6570\u306e\u5217\u306b\u591a\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u304c\u4e57\u3058\u308b\u305f\u3081\u3001\u5408\u8a08\u5bb9\u91cf\u306f\u8a08\u7b97\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <strong>\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u30e1\u30bf\u30c7\u30fc\u30bf<\/strong>.<\/p>\n<p>\u6642\u70b9\u3067\u306f <strong>\u8ad6\u7406\u30c0\u30f3\u30d7<\/strong> (mysqldump) \u3067\u306f\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u30c7\u30fc\u30bf\u3068\u3057\u3066\u79fb\u884c\u3055\u308c\u307e\u305b\u3093\u3002\u5fa9\u5143\u5f8c\u306f\u3001\u610f\u56f3\u7684\u306b\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u518d\u4f5c\u6210\u3057\u307e\u3059\u3002 \u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u306e\u5834\u5408\u306f\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u4fdd\u6301\u3055\u308c\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u306f\u3001\u5404\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066 ANALYZE TABLE \u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u5341\u5206\u306a\u6a29\u9650\u304c\u5fc5\u8981\u3067\u3059\u3002\u898f\u5236\u306e\u53b3\u3057\u3044\u74b0\u5883\u3067\u306f\u3001\u3053\u306e\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4f5c\u696d\u3092\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u7d44\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002.<\/p>\n\n<h2>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u5f79\u306b\u7acb\u305f\u306a\u3044\u5834\u5408<\/h2>\n<p>\u79c1\u306f\u305d\u308c\u3092\u7701\u304f <strong>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0<\/strong> \u5024\u304c\u975e\u5e38\u306b\u5c11\u306a\u304f\u3001\u305d\u3082\u305d\u3082\u6982\u7b97\u3067\u5341\u5206\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u5217\u306b\u3064\u3044\u3066\u306f\u3001\u512a\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u3059\u3067\u306b\u6700\u5c0f\u9650\u306e\u30d2\u30c3\u30c8\u30bb\u30c3\u30c8\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u308b\u5834\u5408\u3067\u3082\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306b\u3088\u3063\u3066\u8ffd\u52a0\u306e\u5229\u70b9\u304c\u5f97\u3089\u308c\u308b\u3053\u3068\u306f\u3081\u3063\u305f\u306b\u3042\u308a\u307e\u305b\u3093\u3002\u5747\u4e00\u306a\u5206\u5e03\u3067\u306f\u3001\u624b\u9593\u306e\u304b\u304b\u308b\u7d30\u304b\u3044\u7c92\u5ea6\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 \u5909\u52d5\u304c\u6fc0\u3057\u304f\u3001\u66f8\u304d\u8fbc\u307f\u304c\u983b\u7e41\u306b\u884c\u308f\u308c\u308b\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3092\u983b\u7e41\u306b\u5b9f\u884c\u3057\u3059\u304e\u308b\u3068\u3001\u4e0d\u5fc5\u8981\u306a\u8ca0\u8377\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u3088\u3046\u306a\u72b6\u6cc1\u3067\u306f\u3001\u79c1\u306f <strong>\u30a8\u30cd\u30eb\u30ae\u30fc<\/strong> \u3080\u3057\u308d\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6226\u7565\u3001\u30af\u30a8\u30ea\u8a2d\u8a08\u3001\u304a\u3088\u3073\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u3064\u3044\u3066\u3002.<\/p>\n\n<h2>\u8868\u5f62\u5f0f\u306e\u30ab\u30f3\u30da<\/h2>\n<p>\u79c1\u306f\u4ee5\u4e0b\u306e\u3082\u306e\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059 <strong>\u6982\u8981<\/strong> \u8fc5\u901f\u306a\u610f\u601d\u6c7a\u5b9a\u306e\u305f\u3081\u306b\uff1a\u3069\u306e\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u30bf\u30a4\u30d7\u304c\u9069\u3057\u3066\u3044\u308b\u304b\u3001\u30d0\u30b1\u30c3\u30c8\u3092\u3069\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u304b\u3001\u305d\u3057\u3066\u3069\u306e\u7a0b\u5ea6\u306e\u30b3\u30b9\u30c8\u304c\u767a\u751f\u3059\u308b\u304b\u3002 \u3053\u306e\u8868\u306f\u3001\u554f\u984c\u306e\u3042\u308b\u30af\u30a8\u30ea\u306e\u30ec\u30d3\u30e5\u30fc\u3092\u884c\u3046\u969b\u306e\u53c2\u8003\u8cc7\u6599\u3068\u3057\u3066\u5f79\u7acb\u3061\u307e\u3059\u3002\u79c1\u306f\u3001EXPLAIN ANALYZE \u3084\u672c\u756a\u74b0\u5883\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u304b\u3089\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u3044\u3066\u3001\u3053\u306e\u8868\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u306f\u5909\u5316\u3057\u3001\u904e\u53bb\u306e\u4eee\u5b9a\u306f\u6642\u4ee3\u9045\u308c\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u7559\u610f\u3057\u3066\u3044\u307e\u3059\u3002\u91cd\u8981\u306a\u306e\u306f\u3001 <strong>\u8a08\u753b\u306e\u8cea<\/strong> \u5b9f\u969b\u306e\u6e2c\u5b9a\u7d50\u679c\u306b\u3088\u3063\u3066\u88cf\u4ed8\u3051\u308b\u3002.<\/p>\n<table>\n  <thead>\n    <tr>\n      <th>\u30a2\u30b9\u30da\u30af\u30c8<\/th>\n      <th>\u63a8\u85a6<\/th>\n      <th>\u30d9\u30cd\u30d5\u30a3\u30c3\u30c8<\/th>\n      <th>\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5<\/th>\n      <th>\u4f8b<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>\u30bf\u30a4\u30d7<\/td>\n      <td>\u5024\u304c\u5c11\u306a\u304f\u3001\u305d\u306e\u3046\u3061\u306e\u3044\u304f\u3064\u304b\u304c\u652f\u914d\u7684\u306a\u5834\u5408\u306e\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3<\/td>\n      <td>\u4e00\u822c\u7684\u306a\u30ab\u30c6\u30b4\u30ea\u3054\u3068\u306e\u6b63\u78ba\u306a\u30d2\u30c3\u30c8\u7387<\/td>\n      <td>\u9023\u7d9a\u3057\u305f\u9818\u57df\u3067\u306f\u3042\u307e\u308a\u5f79\u306b\u7acb\u305f\u306a\u3044<\/td>\n      <td>\u6ce8\u6587\u72b6\u6cc1<\/td>\n    <\/tr>\n    <tr>\n      <td>\u30bf\u30a4\u30d7<\/td>\n      <td>\u6b6a\u3093\u3060\u9023\u7d9a\u30c7\u30fc\u30bf\u306b\u304a\u3051\u308bEqui-Height<\/td>\n      <td>\u5024\u306e\u7bc4\u56f2\u5168\u4f53\u306b\u308f\u305f\u308b\u3088\u308a\u6b63\u78ba\u306a\u63a8\u5b9a<\/td>\n      <td>\u30d0\u30b1\u30c3\u30c8\u6570\u304c\u591a\u3044\u5834\u5408\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u304c\u5897\u3048\u308b<\/td>\n      <td>created_at\u3001price<\/td>\n    <\/tr>\n    <tr>\n      <td>\u30d0\u30b1\u30c3\u30c8<\/td>\n      <td>100\u304b\u3089\u59cb\u3081\u3066\u3001\u305d\u306e\u5f8c\u8abf\u6574\u3059\u308b<\/td>\n      <td>\u30d0\u30e9\u30f3\u30b9\u306e\u53d6\u308c\u305f\u89e3\u50cf\u5ea6<\/td>\n      <td>512\uff5e1024\u306e\u5834\u5408\u3001\u5206\u6790\u304a\u3088\u3073\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u8ca0\u8377\u304c\u9ad8\u304f\u306a\u308b<\/td>\n      <td>\u300c100\u500b\u306e\u30d0\u30b1\u30c4\u300d<\/td>\n    <\/tr>\n    <tr>\n      <td>\u30b1\u30a2<\/td>\n      <td>\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u5909\u66f4\u3092\u884c\u3063\u305f\u5f8c\u306f\u3001ANALYZE\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044<\/td>\n      <td>\u73fe\u5728\u306e\u9078\u629e\u6027<\/td>\n      <td>\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u6642\u9593\u3092\u78ba\u4fdd\u3059\u308b<\/td>\n      <td>ANALYZE TABLE \u2026 UPDATE HISTOGRAM<\/td>\n    <\/tr>\n    <tr>\n      <td>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<\/td>\n      <td>COLUMN_STATISTICS \u3092\u4f7f\u7528\u3057\u3066\u78ba\u8a8d\u3059\u308b<\/td>\n      <td>\u900f\u660e\u6027\u3068\u76e3\u67fb<\/td>\n      <td>JSON\u306e\u89e3\u91c8\u304c\u5fc5\u8981<\/td>\n      <td>INFORMATION_SCHEMA.COLUMN_STATISTICS<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2>\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u5168\u4f53\u306e\u69cb\u56f3\u306b\u304a\u3051\u308b\u4f4d\u7f6e\u3065\u3051<\/h2>\n<p>\u79c1\u306f\u6cbb\u7642\u3059\u308b <strong>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0<\/strong> \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3001\u30af\u30a8\u30ea\u8a2d\u8a08\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u4e26\u3076\u69cb\u6210\u8981\u7d20\u3068\u3057\u3066\u3002\u512a\u308c\u305f\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u7d50\u5408\u9806\u5e8f\u3092\u5909\u66f4\u3057\u3001I\/O\u3092\u524a\u6e1b\u3057\u3001\u5fdc\u7b54\u6642\u9593\u3092\u4e00\u5b9a\u306b\u4fdd\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3068\u306f\u3044\u3048\u3001\u79c1\u306f\u3053\u308c\u3060\u3051\u3067\u9069\u5207\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6226\u7565\u3084\u52b9\u7387\u7684\u306a\u30b9\u30ad\u30fc\u30de\u3092\u7f6e\u304d\u63db\u3048\u308b\u3064\u3082\u308a\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u5b9f\u884c\u8a08\u753b\u306e\u6c7a\u5b9a\u30d7\u30ed\u30bb\u30b9\u3092\u3088\u308a\u6df1\u304f\u6398\u308a\u4e0b\u3052\u308b\u3053\u3068\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u307e\u3059\u3002 <a href=\"https:\/\/webhosting.de\/ja\/%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9%e3%81%ae%e3%82%af%e3%82%a8%e3%83%aa%e5%ae%9f%e8%a1%8c%e3%83%97%e3%83%a9%e3%83%b3%e3%80%81%e6%9c%80%e9%81%a9%e5%8c%96%e3%83%91%e3%83%95%e3%82%a9\/\">\u5b9f\u884c\u8a08\u753b\u306e\u7406\u89e3<\/a> \u305d\u3057\u3066\u3001\u30b3\u30b9\u30c8\u30e2\u30c7\u30eb\u3068\u5b9f\u969b\u306e\u7a3c\u50cd\u6642\u9593\u3092\u6bd4\u8f03\u3057\u307e\u3059\u3002\u79c1\u306f\u5b9a\u671f\u7684\u306b\u3001\u305d\u306e <strong>\u30ef\u30fc\u30af\u30ed\u30fc\u30c9<\/strong> \u7d71\u8a08\u3068\u307e\u3060\u5408\u81f4\u3057\u3066\u3044\u308b\u306e\u304b\u3001\u305d\u308c\u3068\u3082\u8abf\u6574\u304c\u5fc5\u8981\u306a\u306e\u304b\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql-queryplanung-8216.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>\u9ad8\u5ea6\u306a\u7d50\u5408\u30b7\u30ca\u30ea\u30aa<\/h2>\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u30d5\u30a3\u30eb\u30bf\u304c\u9069\u7528\u3055\u308c\u305f\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u304c\u95a2\u4e0e\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u7279\u306b\u6709\u7528\u3067\u3059\u3002\u4f8b\uff1a<\/p>\n<pre><code>SELECT o.id, o.amount\nFROM users u\nJOIN orders o ON o.user_id = u.id\nWHERE u.country = 'DE'\n  AND o.status = 'canceled'\n  AND o.created_at &gt;= NOW() - INTERVAL 30 DAY;\n<\/code><\/pre>\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u306a\u3044\u5834\u5408\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u30fc\u306f o.status=\u2019canceled\u2018 \u306e\u9078\u629e\u6027\u3092\u904e\u5c0f\u8a55\u4fa1\u3057\u305f\u308a\u3001\u30c9\u30a4\u30c4\u4eba\u30e6\u30fc\u30b6\u30fc\u306e\u5272\u5408\u3092\u904e\u5927\u8a55\u4fa1\u3057\u305f\u308a\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001 <em>u.country<\/em> \u305d\u3057\u3066 <em>o.status<\/em> \uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3067\u3082\uff09 <em>o.created_at<\/em>) \u8a2d\u8a08\u8005\u306f\u305f\u3044\u3066\u3044\u3001\u3053\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u6975\u3081\u3066\u9078\u629e\u7684\u3067\u3042\u308b\u3053\u3068\u3092\u8a8d\u8b58\u3057\u3066\u3044\u307e\u3059\u3002 \u5b9f\u969b\u306e\u904b\u7528\u3067\u306f\u3001MySQL\u304c\u307e\u305a\u5c0f\u3055\u3044\u90e8\u5206\u96c6\u5408\u3092\u7279\u5b9a\u3057\uff08\u4f8b\uff1ausers(country)\u3084orders(status, created_at)\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4ecb\u3057\u3066\uff09\u3001\u305d\u306e\u5f8c\u3067\u30b8\u30e7\u30a4\u30f3\u3092\u5b9f\u884c\u3059\u308b\u69d8\u5b50\u304c\u898b\u3089\u308c\u307e\u3059\u3002\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u3067\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001I\/O\u3001\u30d0\u30c3\u30d5\u30a1\u3001CPU\u30ea\u30bd\u30fc\u30b9\u3092\u7bc0\u7d04\u3067\u304d\u3001\u8ca0\u8377\u304c\u304b\u304b\u3063\u3066\u3044\u308b\u72b6\u6cc1\u3067\u3082\u30ec\u30a4\u30c6\u30f3\u30b7\u3092\u5b89\u5b9a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002.<\/p>\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u5358\u306b <strong>1\u6bb5\u7d44<\/strong> \u3067\u3042\u308b\u305f\u3081\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6226\u7565\u306f\u4f9d\u7136\u3068\u3057\u3066\u91cd\u8981\u3067\u3059\u3002\uff08status\u3001created_at\uff09\u306b\u57fa\u3065\u304f\u8907\u5408\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30ec\u30f3\u30b8\u30b9\u30ad\u30e3\u30f3\u3092\u3055\u3089\u306b\u9ad8\u901f\u5316\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u4e3b\u306a\u5f79\u5272\u306f\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u3053\u308c\u3092 <em>\u6226\u7565<\/em> \u305d\u3082\u305d\u3082\u5b89\u4fa1\u3060\u3068\u8a8d\u8b58\u3057\u3066\u3044\u308b\u3002.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\">\n  <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/08\/mysql_histogram_desk_4721.png\" alt=\"\" width=\"1536\" height=\"1024\"\/>\n<\/figure>\n\n\n<h2>\u5b9f\u8df5\u306e\u305f\u3081\u306e\u307e\u3068\u3081<\/h2>\n<p>\u3092\u30bb\u30c3\u30c8\u3057\u305f\u3002 <strong>MySQL<\/strong>- \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u6a19\u6e96\u7d71\u8a08\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u8aa4\u3063\u305f\u5224\u65ad\u3092\u4e0b\u3057\u3001\u504f\u3063\u305f\u5206\u5e03\u304c\u4e0d\u9069\u5207\u306a\u5b9f\u884c\u8a08\u753b\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002ANALYZE TABLE \u3092\u4f7f\u7528\u3057\u3066\u3001\u30d5\u30a3\u30eb\u30bf\u3084\u7d50\u5408\u3067\u4e3b\u8981\u3068\u306a\u308b\u5217\u306e\u7d71\u8a08\u60c5\u5831\u3092\u3001\u76ee\u7684\u3092\u7d5e\u3063\u3066\u4f5c\u6210\u3001\u66f4\u65b0\u3001\u524a\u9664\u3057\u307e\u3059\u3002 Singleton\u3068Equi-Height\u306e\u3069\u3061\u3089\u3092\u9078\u629e\u3059\u308b\u304b\u306f\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u3066\u6c7a\u5b9a\u3057\u3001\u30d0\u30b1\u30c3\u30c8\u6570\u306f\u6e2c\u5b9a\u7d50\u679c\u3092\u3082\u3068\u306b\u8abf\u6574\u3057\u307e\u3059\u3002EXPLAIN ANALYZE\u3092\u4f7f\u7528\u3057\u3066\u3001\u7d50\u5408\u9806\u5e8f\u3001\u30d5\u30a3\u30eb\u30bf\u306e\u4f4d\u7f6e\u3001\u30b9\u30ad\u30e3\u30f3\u304c\u610f\u56f3\u3057\u305f\u901a\u308a\u306b\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u6700\u5c0f\u9650\u306e <strong>\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9<\/strong> \u30af\u30a8\u30ea\u306e\u5b9f\u884c\u901f\u5ea6\u304c\u660e\u3089\u304b\u306b\u5411\u4e0a\u2015\u2015\u591a\u304f\u306e\u5834\u5408\u3001\u8ffd\u52a0\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5fc5\u8981\u3068\u305b\u305a\u306b\u3002.<\/p>","protected":false},"excerpt":{"rendered":"<p>MySQL\u306e\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u304c\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u6b63\u78ba\u306a\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u7d71\u8a08\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u3001\u3088\u308a\u512a\u308c\u305f\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\u3092\u5b9f\u73fe\u3057\u3001\u8ffd\u52a0\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306a\u3057\u3067SQL\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u5927\u5e45\u306b\u6539\u5584\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3057\u3087\u3046\u3002.<\/p>","protected":false},"author":1,"featured_media":21011,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[781],"tags":[],"class_list":["post-21018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-datenbanken-administration-anleitungen"],"acf":[],"_wp_attached_file":null,"_wp_attachment_metadata":null,"litespeed-optimize-size":null,"litespeed-optimize-set":null,"_elementor_source_image_hash":null,"_wp_attachment_image_alt":null,"stockpack_author_name":null,"stockpack_author_url":null,"stockpack_provider":null,"stockpack_image_url":null,"stockpack_license":null,"stockpack_license_url":null,"stockpack_modification":null,"color":null,"original_id":null,"original_url":null,"original_link":null,"unsplash_location":null,"unsplash_sponsor":null,"unsplash_exif":null,"unsplash_attachment_metadata":null,"_elementor_is_screenshot":null,"surfer_file_name":null,"surfer_file_original_url":null,"envato_tk_source_kit":null,"envato_tk_source_index":null,"envato_tk_manifest":null,"envato_tk_folder_name":null,"envato_tk_builder":null,"envato_elements_download_event":null,"_menu_item_type":null,"_menu_item_menu_item_parent":null,"_menu_item_object_id":null,"_menu_item_object":null,"_menu_item_target":null,"_menu_item_classes":null,"_menu_item_xfn":null,"_menu_item_url":null,"_trp_menu_languages":null,"rank_math_primary_category":null,"rank_math_title":null,"inline_featured_image":null,"_yoast_wpseo_primary_category":null,"rank_math_schema_blogposting":null,"rank_math_schema_videoobject":null,"_oembed_049c719bc4a9f89deaead66a7da9fddc":null,"_oembed_time_049c719bc4a9f89deaead66a7da9fddc":null,"_yoast_wpseo_focuskw":null,"_yoast_wpseo_linkdex":null,"_oembed_27e3473bf8bec795fbeb3a9d38489348":null,"_oembed_c3b0f6959478faf92a1f343d8f96b19e":null,"_trp_translated_slug_en_us":null,"_wp_desired_post_slug":null,"_yoast_wpseo_title":null,"tldname":null,"tldpreis":null,"tldrubrik":null,"tldpolicylink":null,"tldsize":null,"tldregistrierungsdauer":null,"tldtransfer":null,"tldwhoisprivacy":null,"tldregistrarchange":null,"tldregistrantchange":null,"tldwhoisupdate":null,"tldnameserverupdate":null,"tlddeletesofort":null,"tlddeleteexpire":null,"tldumlaute":null,"tldrestore":null,"tldsubcategory":null,"tldbildname":null,"tldbildurl":null,"tldclean":null,"tldcategory":null,"tldpolicy":null,"tldbesonderheiten":null,"tld_bedeutung":null,"_oembed_d167040d816d8f94c072940c8009f5f8":null,"_oembed_b0a0fa59ef14f8870da2c63f2027d064":null,"_oembed_4792fa4dfb2a8f09ab950a73b7f313ba":null,"_oembed_33ceb1fe54a8ab775d9410abf699878d":null,"_oembed_fd7014d14d919b45ec004937c0db9335":null,"_oembed_21a029d076783ec3e8042698c351bd7e":null,"_oembed_be5ea8a0c7b18e658f08cc571a909452":null,"_oembed_a9ca7a298b19f9b48ec5914e010294d2":null,"_oembed_f8db6b27d08a2bb1f920e7647808899a":null,"_oembed_168ebde5096e77d8a89326519af9e022":null,"_oembed_cdb76f1b345b42743edfe25481b6f98f":null,"_oembed_87b0613611ae54e86e8864265404b0a1":null,"_oembed_27aa0e5cf3f1bb4bc416a4641a5ac273":null,"_oembed_time_27aa0e5cf3f1bb4bc416a4641a5ac273":null,"_tldname":null,"_tldclean":null,"_tldpreis":null,"_tldcategory":null,"_tldsubcategory":null,"_tldpolicy":null,"_tldpolicylink":null,"_tldsize":null,"_tldregistrierungsdauer":null,"_tldtransfer":null,"_tldwhoisprivacy":null,"_tldregistrarchange":null,"_tldregistrantchange":null,"_tldwhoisupdate":null,"_tldnameserverupdate":null,"_tlddeletesofort":null,"_tlddeleteexpire":null,"_tldumlaute":null,"_tldrestore":null,"_tldbildname":null,"_tldbildurl":null,"_tld_bedeutung":null,"_tldbesonderheiten":null,"_oembed_ad96e4112edb9f8ffa35731d4098bc6b":null,"_oembed_8357e2b8a2575c74ed5978f262a10126":null,"_oembed_3d5fea5103dd0d22ec5d6a33eff7f863":null,"_eael_widget_elements":null,"_oembed_0d8a206f09633e3d62b95a15a4dd0487":null,"_oembed_time_0d8a206f09633e3d62b95a15a4dd0487":null,"_aioseo_description":null,"_eb_attr":null,"_eb_data_table":null,"_oembed_819a879e7da16dd629cfd15a97334c8a":null,"_oembed_time_819a879e7da16dd629cfd15a97334c8a":null,"_acf_changed":null,"_wpcode_auto_insert":null,"_edit_last":null,"_edit_lock":null,"_oembed_e7b913c6c84084ed9702cb4feb012ddd":null,"_oembed_bfde9e10f59a17b85fc8917fa7edf782":null,"_oembed_time_bfde9e10f59a17b85fc8917fa7edf782":null,"_oembed_03514b67990db061d7c4672de26dc514":null,"_oembed_time_03514b67990db061d7c4672de26dc514":null,"rank_math_news_sitemap_robots":null,"rank_math_robots":null,"_eael_post_view_count":"69","_trp_automatically_translated_slug_ru_ru":null,"_trp_automatically_translated_slug_et":null,"_trp_automatically_translated_slug_lv":null,"_trp_automatically_translated_slug_fr_fr":null,"_trp_automatically_translated_slug_en_us":null,"_wp_old_slug":null,"_trp_automatically_translated_slug_da_dk":null,"_trp_automatically_translated_slug_pl_pl":null,"_trp_automatically_translated_slug_es_es":null,"_trp_automatically_translated_slug_hu_hu":null,"_trp_automatically_translated_slug_fi":null,"_trp_automatically_translated_slug_ja":null,"_trp_automatically_translated_slug_lt_lt":null,"_elementor_edit_mode":null,"_elementor_template_type":null,"_elementor_version":null,"_elementor_pro_version":null,"_wp_page_template":null,"_elementor_page_settings":null,"_elementor_data":null,"_elementor_css":null,"_elementor_conditions":null,"_happyaddons_elements_cache":null,"_oembed_75446120c39305f0da0ccd147f6de9cb":null,"_oembed_time_75446120c39305f0da0ccd147f6de9cb":null,"_oembed_3efb2c3e76a18143e7207993a2a6939a":null,"_oembed_time_3efb2c3e76a18143e7207993a2a6939a":null,"_oembed_59808117857ddf57e478a31d79f76e4d":null,"_oembed_time_59808117857ddf57e478a31d79f76e4d":null,"_oembed_965c5b49aa8d22ce37dfb3bde0268600":null,"_oembed_time_965c5b49aa8d22ce37dfb3bde0268600":null,"_oembed_81002f7ee3604f645db4ebcfd1912acf":null,"_oembed_time_81002f7ee3604f645db4ebcfd1912acf":null,"_elementor_screenshot":null,"_oembed_7ea3429961cf98fa85da9747683af827":null,"_oembed_time_7ea3429961cf98fa85da9747683af827":null,"_elementor_controls_usage":null,"_elementor_page_assets":[],"_elementor_screenshot_failed":null,"theplus_transient_widgets":null,"_eael_custom_js":null,"_wp_old_date":null,"_trp_automatically_translated_slug_it_it":null,"_trp_automatically_translated_slug_pt_pt":null,"_trp_automatically_translated_slug_zh_cn":null,"_trp_automatically_translated_slug_nl_nl":null,"_trp_automatically_translated_slug_pt_br":null,"_trp_automatically_translated_slug_sv_se":null,"rank_math_analytic_object_id":null,"rank_math_internal_links_processed":"1","_trp_automatically_translated_slug_ro_ro":null,"_trp_automatically_translated_slug_sk_sk":null,"_trp_automatically_translated_slug_bg_bg":null,"_trp_automatically_translated_slug_sl_si":null,"litespeed_vpi_list":null,"litespeed_vpi_list_mobile":null,"rank_math_seo_score":null,"rank_math_contentai_score":null,"ilj_limitincominglinks":null,"ilj_maxincominglinks":null,"ilj_limitoutgoinglinks":null,"ilj_maxoutgoinglinks":null,"ilj_limitlinksperparagraph":null,"ilj_linksperparagraph":null,"ilj_blacklistdefinition":null,"ilj_linkdefinition":null,"_eb_reusable_block_ids":null,"rank_math_focus_keyword":"MySQL Histograms","rank_math_og_content_image":null,"_yoast_wpseo_metadesc":null,"_yoast_wpseo_content_score":null,"_yoast_wpseo_focuskeywords":null,"_yoast_wpseo_keywordsynonyms":null,"_yoast_wpseo_estimated-reading-time-minutes":null,"rank_math_description":null,"surfer_last_post_update":null,"surfer_last_post_update_direction":null,"surfer_keywords":null,"surfer_location":null,"surfer_draft_id":null,"surfer_permalink_hash":null,"surfer_scrape_ready":null,"_thumbnail_id":"21011","footnotes":null,"_links":{"self":[{"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/posts\/21018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/comments?post=21018"}],"version-history":[{"count":0,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/posts\/21018\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/media\/21011"}],"wp:attachment":[{"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/media?parent=21018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/categories?post=21018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhosting.de\/ja\/wp-json\/wp\/v2\/tags?post=21018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}