{"id":3877,"date":"2026-09-23T09:00:00","date_gmt":"2026-09-23T00:00:00","guid":{"rendered":"https:\/\/wptoolslab.com\/query-lab\/?post_type=wpq_article&#038;p=3877"},"modified":"2026-09-14T13:51:32","modified_gmt":"2026-09-14T04:51:32","slug":"wp-query-performance","status":"publish","type":"wpq_article","link":"https:\/\/wptoolslab.com\/query-lab\/articles\/wp-query-performance\/","title":{"rendered":"WP_Query\u304c\u91cd\u3044\u3068\u304d\u306e\u9ad8\u901f\u5316\u65b9\u6cd5\uff5c\u539f\u56e0\u306e\u6e2c\u308a\u65b9\u3068\u6539\u5584\u624b\u9806"},"content":{"rendered":"<section class=\"conclusion wpq-conclusion\"><h2 class=\"wpq-conclusion__title\">WP_Query\u304c\u91cd\u3044\u3068\u304d\u306f\u3001\u901f\u305d\u3046\u306a\u5f15\u6570\u3088\u308a\u5148\u306b\u8a08\u6e2c\u3059\u308b<\/h2><p>WP_Query\u306e\u9ad8\u901f\u5316\u306f\u3001`\u8a08\u6e2c \u2192 \u53d6\u5f97\u91cf \u2192 \u7dcf\u4ef6\u6570 \u2192 \u53d6\u5f97\u9805\u76ee \u2192 \u8ffd\u52a0\u30af\u30a8\u30ea \u2192 \u6761\u4ef6\u30fb\u4e26\u3073\u9806 \u2192 \u30ad\u30e3\u30c3\u30b7\u30e5 \u2192 \u518d\u8a08\u6e2c`\u306e\u9806\u3067\u9032\u3081\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u8868\u793a\u4ef6\u6570\u3092\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u3057\u3001\u30da\u30fc\u30b8\u9001\u308a\u304c\u306a\u3044\u4e00\u89a7\u3060\u3051`no_found_rows`\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002ID\u3060\u3051\u3067\u76ee\u7684\u3092\u6e80\u305f\u305b\u308b\u51e6\u7406\u3067\u306f`fields => \u2018ids\u2019`\u3082\u5019\u88dc\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u52b9\u679c\u306f\u6295\u7a3f\u6570\u3001\u6761\u4ef6\u3001\u8868\u793a\u5185\u5bb9\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u74b0\u5883\u3067\u5909\u308f\u308b\u305f\u3081\u3001\u5909\u66f4\u524d\u5f8c\u3092\u540c\u3058\u6761\u4ef6\u3067\u6bd4\u3079\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/section>\n<h2 id=\"measure-first\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"clock\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <circle cx=\"12\" cy=\"12\" r=\"10\" \/>\n  <path d=\"M12 6v6l4 2\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">\u300cWP_Query\u304c\u91cd\u3044\u300d\u3068\u6c7a\u3081\u3064\u3051\u305a\u3001\u540c\u3058\u6761\u4ef6\u3067\u6e2c\u308b<\/span><\/h2>\n<p>\u9045\u3055\u306e\u539f\u56e0\u304c\u753b\u50cf\u3001\u5916\u90e8API\u3001PHP\u3001\u30b5\u30fc\u30d0\u30fc\u5fdc\u7b54\u306a\u3089\u3001\u30af\u30a8\u30ea\u5f15\u6570\u3092\u5909\u3048\u3066\u3082\u6539\u5584\u3057\u307e\u305b\u3093\u3002\u691c\u8a3c\u74b0\u5883\u3067Query Monitor\u306a\u3069\u3092\u4f7f\u3044\u3001\u6642\u9593\u306e\u9577\u3044\u30af\u30a8\u30ea\u3001\u540c\u3058SQL\u306e\u7e70\u308a\u8fd4\u3057\u3001\u547c\u3073\u51fa\u3057\u5143\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u5909\u66f4\u524d\u306e\u6642\u9593\u3068\u30af\u30a8\u30ea\u6570\u3082\u8a18\u9332\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Query Monitor\u3092\u6709\u52b9\u5316\u3057\u305f\u3089\u3001\u95b2\u89a7\u6a29\u9650\u306e\u3042\u308b\u7ba1\u7406\u8005\u3067\u5bfe\u8c61\u30da\u30fc\u30b8\u3092\u958b\u304d\u3001\u7ba1\u7406\u30d0\u30fc\u306e\u8a3a\u65ad\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300cQueries\u300d\u3084\u300cQueries by Component \/ Caller\u300d\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u8868\u793a\u540d\u306f\u8a00\u8a9e\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u7570\u306a\u308a\u307e\u3059\u3002\u5bfe\u8c61\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u7279\u5b9a\u3057\u3001\u30da\u30fc\u30b8\u751f\u6210\u6642\u9593\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30a8\u30ea\u306e\u5408\u8a08\u6642\u9593\u3001\u30af\u30a8\u30ea\u6570\u3001\u9045\u3044SQL\u3092\u8a18\u9332\u3057\u3066\u304b\u30891\u9805\u76ee\u3060\u3051\u5909\u66f4\u3057\u307e\u3059\u3002\u8a08\u6e2c\u5f8c\u306f\u4e0d\u8981\u306a\u8a3a\u65ad\u6a5f\u80fd\u3092\u6b62\u3081\u3001\u516c\u958b\u753b\u9762\u3078SQL\u3084\u30c7\u30d0\u30c3\u30b0\u5024\u3092\u6b8b\u3055\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"wpq-table-block\"><p class=\"wpq-table-hint\" aria-hidden=\"true\">\u8868\u306f\u6a2a\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u304d\u307e\u3059<\/p><div class=\"cause-table table-scroll wpq-table-wrap\" role=\"region\" tabindex=\"0\" aria-label=\"\u8868: \u898b\u308b\u3082\u306e \/ \u5206\u304b\u308b\u3053\u3068 \/ \u6b21\u306e\u5224\u65ad\"><table class=\"article-table table-priority wpq-article-table\"><thead><tr><th>\u898b\u308b\u3082\u306e<\/th><th>\u5206\u304b\u308b\u3053\u3068<\/th><th>\u6b21\u306e\u5224\u65ad<\/th><\/tr><\/thead><tbody><tr><td>\u30da\u30fc\u30b8\u5168\u4f53\u306e\u5fdc\u7b54\u6642\u9593<\/td><td>\u9045\u3055\u3092\u518d\u73fe\u3067\u304d\u3066\u3044\u308b\u304b<\/td><td>\u540c\u3058URL\u30fb\u540c\u3058\u30c7\u30fc\u30bf\u3067\u5909\u66f4\u524d\u5f8c\u3092\u6bd4\u3079\u308b<\/td><\/tr><tr><td>WP_Query\u7531\u6765\u306eSQL<\/td><td>\u6642\u9593\u306e\u9577\u3044\u53d6\u5f97\u3084\u7e70\u308a\u8fd4\u3057\u304c\u3042\u308b\u304b<\/td><td>\u5bfe\u8c61\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068$args\u3092\u7279\u5b9a\u3059\u308b<\/td><\/tr><tr><td>\u30af\u30a8\u30ea\u6570<\/td><td>\u30eb\u30fc\u30d7\u5185\u306e\u8ffd\u52a0\u53d6\u5f97\u304c\u5897\u3048\u3066\u3044\u306a\u3044\u304b<\/td><td>N+1\u3084\u30ad\u30e3\u30c3\u30b7\u30e5\u6e96\u5099\u3092\u78ba\u8a8d\u3059\u308b<\/td><\/tr><tr><td>\u753b\u50cf\u30fb\u5916\u90e8\u901a\u4fe1\u30fbPHP\u51e6\u7406<\/td><td>SQL\u4ee5\u5916\u304c\u652f\u914d\u7684\u3067\u306f\u306a\u3044\u304b<\/td><td>WP_Query\u4ee5\u5916\u306e\u6539\u5584\u3078\u5207\u308a\u66ff\u3048\u308b<\/td><\/tr><\/tbody><\/table><\/div><\/div>\n<span class=\"wpq-marker wpq-marker--yellow\">\u300c\u901f\u304f\u306a\u3063\u305f\u6c17\u304c\u3059\u308b\u300d\u3067\u306f\u306a\u304f\u3001\u540c\u3058\u6761\u4ef6\u3067\u8a08\u6e2c\u5024\u3068\u8868\u793a\u7d50\u679c\u306e\u4e21\u65b9\u3092\u6bd4\u3079\u308b\u3053\u3068\u304c\u51fa\u767a\u70b9\u3067\u3059\u3002<\/span>\n<p>Query Monitor\u3067\u898b\u308b\u9805\u76ee\u3068\u5207\u308a\u5206\u3051\u624b\u9806\u306f\u3001\u6b21\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wpq-related-links\"><a class=\"deep-link-card wpq-related-link wpq-related-link--internal\" href=\"https:\/\/wptoolslab.com\/query-lab\/?post_type=wpq_article&#038;p=4082\"><span class=\"article-thumb wpq-related-link__thumb\"><img decoding=\"async\" alt=\"Query Monitor\u3067\u91cd\u3044WP_Query\u3092\u7279\u5b9a\u3059\u308b\u65b9\u6cd5\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/09\/query-monitor-slow-wp-query-card.png\" loading=\"lazy\" \/><\/span><div class=\"deep-link-copy wpq-related-link__copy\"><small>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/small><b>Query Monitor\u3067\u91cd\u3044WP_Query\u3092\u7279\u5b9a\u3059\u308b\u65b9\u6cd5<\/b><span class=\"jump\"><span>\u8a18\u4e8b\u3092\u8aad\u3080<\/span><\/span><\/div><\/a><\/div>\n<h2 id=\"reduce-work\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"filter\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <circle cx=\"12\" cy=\"12\" r=\"10\" \/>\n  <path d=\"M12 16v-4\" \/>\n  <path d=\"M12 8h.01\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">\u53d6\u5f97\u3068\u51e6\u7406\u306e\u7121\u99c4\u3092\u9806\u756a\u306b\u6e1b\u3089\u3059<\/span><\/h2>\n<p>\u8a08\u6e2c\u7d50\u679c\u3092\u898b\u306a\u304c\u3089\u3001\u6761\u4ef6\u30921\u3064\u305a\u3064\u5909\u3048\u307e\u3059\u3002<\/p>\n<h3 id=\"reduce-results\" class=\"wpq-subheading\">1. \u53d6\u5f97\u4ef6\u6570\u3092\u8868\u793a\u306b\u5fc5\u8981\u306a\u6570\u307e\u3067\u6e1b\u3089\u3059<\/h3>\n<p>\u95a2\u9023\u8a18\u4e8b\u30924\u4ef6\u8868\u793a\u3059\u308b\u306a\u3089\u3001`posts_per_page`\u30824\u4ef6\u306b\u3057\u307e\u3059\u300220\u4ef6\u53d6\u5f97\u3057\u3066PHP\u5074\u3067\u6368\u3066\u308b\u51e6\u7406\u306f\u907f\u3051\u307e\u3059\u3002<\/p>\n<p>\u7279\u306b`posts_per_page =&gt; -1`\u306f\u3001\u6761\u4ef6\u306b\u5408\u3046\u6295\u7a3f\u3092\u5168\u4ef6\u53d6\u5f97\u3059\u308b\u6307\u5b9a\u3067\u3059\u3002\u672c\u5f53\u306b\u5168\u4ef6\u304c\u5fc5\u8981\u3067\u3057\u3087\u3046\u304b\u3002\u516c\u958b\u30da\u30fc\u30b8\u3067\u306f\u3001\u30da\u30fc\u30b8\u5206\u5272\u3001\u4ef6\u6570\u4e0a\u9650\u3001\u7ba1\u7406\u7528\u306e\u30d0\u30c3\u30c1\u51e6\u7406\u3078\u306e\u5206\u96e2\u3092\u5148\u306b\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002[\u5168\u4ef6\u53d6\u5f97\u306e\u6ce8\u610f\u70b9](..\/posts-per-page-minus-one\/)\u3067\u306f\u3001\u4ee3\u308f\u308a\u306b\u9078\u3079\u308b\u65b9\u6cd5\u307e\u3067\u6574\u7406\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"skip-total\" class=\"wpq-subheading\">2. \u30da\u30fc\u30b8\u9001\u308a\u304c\u306a\u3044\u4e00\u89a7\u3060\u3051\u7dcf\u4ef6\u6570\u8a08\u7b97\u3092\u7701\u304f<\/h3>\n<p>\u95a2\u9023\u8a18\u4e8b\u3084\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u65b0\u7740\u4e00\u89a7\u306e\u3088\u3046\u306b\u3001\u30da\u30fc\u30b8\u9001\u308a\u3092\u4f5c\u3089\u306a\u3044\u8868\u793a\u3067\u306f`no_found_rows =&gt; true`\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u306b\u5fc5\u8981\u306a\u7dcf\u4ef6\u6570\u3092\u6c42\u3081\u306a\u3044\u6307\u5b9a\u3067\u3059\u3002<\/p>\n<span class=\"wpq-marker wpq-marker--yellow\">\u901a\u5e38\u306e\u30da\u30fc\u30b8\u756a\u53f7\u3084\u300c\u6b21\u306e\u30da\u30fc\u30b8\u300d\u306e\u30ea\u30f3\u30af\u3092`max_num_pages`\u304b\u3089\u4f5c\u308b\u5834\u5408\u306f\u3001\u6761\u4ef6\u306b\u5408\u3046\u7dcf\u4ef6\u6570\u306e\u8a08\u7b97\u304c\u5fc5\u8981\u3067\u3059\u3002<\/span>\n<p>\u3053\u308c\u3089\u3092\u4f7f\u308f\u306a\u3044\u5c0f\u3055\u306a\u4e00\u89a7\u3060\u3051\u3001\u7dcf\u4ef6\u6570\u8a08\u7b97\u3092\u7701\u3051\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002\u5225\u65b9\u5f0f\u3067\u6b21\u306e\u30c7\u30fc\u30bf\u306e\u6709\u7121\u3092\u5224\u5b9a\u3059\u308b\u5b9f\u88c5\u307e\u3067\u3001\u7dcf\u4ef6\u6570\u304c\u5fc5\u9808\u3068\u3044\u3046\u610f\u5473\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"return-fields\" class=\"wpq-subheading\">3. ID\u3060\u3051\u3067\u76ee\u7684\u3092\u6e80\u305f\u305b\u308b\u3068\u304d\u306ffields\u3092\u691c\u8a0e\u3059\u308b<\/h3>\n<p>\u5225\u306e\u51e6\u7406\u3078\u6295\u7a3fID\u3092\u6e21\u3059\u3060\u3051\u306a\u3089\u3001`fields =&gt; &#8216;ids&#8217;`\u3067ID\u3060\u3051\u3092\u53d7\u3051\u53d6\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u5f8c\u7d9a\u51e6\u7406\u3078ID\u4e00\u89a7\u3092\u6e21\u3059\u3001\u8868\u793a\u6e08\u307fID\u3092`post__not_in`\u3078\u6e21\u3059\u3001\u4e00\u5b9a\u4ef6\u6570\u305a\u3064\u66f4\u65b0\u3059\u308b\u7ba1\u7406\u51e6\u7406\u306a\u3069\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u901a\u5e38\u306e\u8a18\u4e8b\u30ab\u30fc\u30c9\u3067\u30bf\u30a4\u30c8\u30eb\u3001URL\u3001\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8868\u793a\u3059\u308b\u306a\u3089\u3001\u5f8c\u304b\u3089\u6295\u7a3f\u60c5\u5831\u3092\u53d6\u308a\u76f4\u3059\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>ID\u53d6\u5f97\u5f8c\u306b\u6295\u7a3f\u3054\u3068\u306b\u60c5\u5831\u3092\u53d6\u308a\u76f4\u3059\u3068\u3001\u8ffd\u52a0\u30af\u30a8\u30ea\u304c\u5897\u3048\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002`fields`\u306fID\u3060\u3051\u3067\u51e6\u7406\u304c\u7d42\u308f\u308b\u5834\u9762\u306b\u9650\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"n-plus-one\" class=\"wpq-subheading\">4. \u30eb\u30fc\u30d7\u5185\u306e\u8ffd\u52a0\u53d6\u5f97\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u6e96\u5099\u3092\u78ba\u8a8d\u3059\u308b<\/h3>\n<span class=\"wpq-marker wpq-marker--yellow\">\u4e00\u89a7\u672c\u4f53\u306e\u30af\u30a8\u30ea\u304c1\u56de\u3067\u3082\u3001\u30eb\u30fc\u30d7\u5185\u3067\u6295\u7a3f\u3054\u3068\u306b\u8ffd\u52a0\u306e\u30e1\u30bf\u60c5\u5831\u3084\u30bf\u30fc\u30e0\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001\u4ef6\u6570\u306b\u5fdc\u3058\u3066\u30af\u30a8\u30ea\u6570\u304c\u5897\u3048\u308b\u72b6\u614b\u3092N+1\u3068\u547c\u3073\u307e\u3059\u3002<\/span>\n<p>WP_Query\u306b\u306f\u3001\u6295\u7a3f\u30e1\u30bf\u3084\u30bf\u30fc\u30e0\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6e96\u5099\u3059\u308b`update_post_meta_cache`\u3001`update_post_term_cache`\u304c\u3042\u308a\u307e\u3059\u3002\u8868\u793a\u306b\u4f7f\u308f\u306a\u3044\u3053\u3068\u304c\u660e\u78ba\u306a\u3089`false`\u3092\u691c\u8a0e\u3057\u307e\u3059\u304c\u3001\u6a5f\u68b0\u7684\u306b\u7121\u52b9\u306b\u3059\u308b\u3053\u3068\u306f\u304a\u52e7\u3081\u3057\u307e\u305b\u3093\u3002\u7121\u52b9\u306b\u3057\u305f\u5f8c\u3067\u5404\u6295\u7a3f\u306e\u30e1\u30bf\u5024\u3084\u30ab\u30c6\u30b4\u30ea\u30fc\u3092\u8aad\u3080\u3068\u3001\u304b\u3048\u3063\u3066\u8ffd\u52a0\u53d6\u5f97\u304c\u5897\u3048\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u95a2\u9023\u5f15\u6570\u3092\u307e\u3068\u3081\u3066\u30b3\u30d4\u30fc\u305b\u305a\u3001\u4e00\u89a7\u306b\u4f7f\u3046\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u3066\u304b\u30891\u3064\u305a\u3064\u5909\u66f4\u3057\u307e\u3059\u3002\u30bf\u30a4\u30c8\u30eb\u3068URL\u3060\u3051\u306e\u4e00\u89a7\u3067\u3082\u3001\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u306b`%category%`\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u3067\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3084\u30e1\u30bf\u60c5\u5831\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u898b\u3048\u308b\u9805\u76ee\u3060\u3051\u3067\u300c\u30ad\u30e3\u30c3\u30b7\u30e5\u6e96\u5099\u306f\u4e0d\u8981\u300d\u3068\u306f\u5224\u65ad\u3057\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"conditions-order\" class=\"wpq-subheading\">5. \u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u3068\u4e26\u3073\u9806\u3092\u5fc5\u8981\u4ee5\u4e0a\u306b\u8907\u96d1\u306b\u3057\u306a\u3044<\/h3>\n<p>\u8907\u6570\u306e`meta_query`\u3001\u5e83\u3044`LIKE`\u691c\u7d22\u3001\u591a\u6570\u306e`OR`\u3001`NOT EXISTS`\u3001\u5927\u304d\u306a`post__in`\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u5024\u3067\u306e\u4e26\u3073\u66ff\u3048\u3001`orderby =&gt; &#8216;rand&#8217;`\u306a\u3069\u306f\u3001\u30c7\u30fc\u30bf\u91cf\u3084\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3001\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u3063\u3066\u8ca0\u8377\u304c\u5897\u3048\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u7279\u5b9a\u306e\u5f15\u6570\u3092\u898b\u305f\u3060\u3051\u3067\u300c\u5fc5\u305a\u9045\u3044\u300d\u3068\u306f\u65ad\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002\u6761\u4ef6\u3092\u4e00\u3064\u305a\u3064\u5916\u3057\u3066\u8a08\u6e2c\u3057\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3084\u30bf\u30b0\u3067\u8868\u305b\u308b\u5206\u985e\u3092\u6295\u7a3f\u30e1\u30bf\u3067\u6301\u3063\u3066\u3044\u306a\u3044\u304b\u3001\u5fc5\u8981\u306e\u306a\u3044\u4e26\u3073\u66ff\u3048\u3092\u3057\u3066\u3044\u306a\u3044\u304b\u3092\u898b\u76f4\u3057\u307e\u3059\u3002[meta_query\u306e\u57fa\u672c](..\/meta-query-filtering\/)\u3068[\u30e9\u30f3\u30c0\u30e0\u8868\u793a\u306e\u6ce8\u610f\u70b9](..\/wp-query-random-display-cautions\/)\u3082\u3001\u5bfe\u8c61\u306e\u6761\u4ef6\u306b\u5408\u308f\u305b\u3066\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<span class=\"wpq-marker wpq-marker--yellow\">\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u3092\u3001\u5fc5\u8981\u306a\u4ef6\u6570\u3060\u3051\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u57fa\u672c\u3067\u3059\u3002\u691c\u7d22\u7bc4\u56f2\u3084\u7d5e\u308a\u8fbc\u307f\u3092\u5fc5\u8981\u4ee5\u4e0a\u306b\u5e83\u3052\u305a\u3001\u8868\u793a\u306b\u4f7f\u308f\u306a\u3044\u30c7\u30fc\u30bf\u3084\u51e6\u7406\u3092\u6e1b\u3089\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span>\n<p>\u53d6\u5f97\u9805\u76ee\u30fb\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u30fb\u30e9\u30f3\u30c0\u30e0\u8868\u793a\u30fb\u5206\u985e\u6761\u4ef6\u3092\u500b\u5225\u306b\u898b\u76f4\u3059\u5834\u5408\u306f\u3001\u6b21\u306e\u8a18\u4e8b\u3078\u9032\u307f\u307e\u3059\u3002<\/p>\n<div class=\"wpq-related-links\"><a class=\"deep-link-card wpq-related-link wpq-related-link--internal\" href=\"https:\/\/wptoolslab.com\/query-lab\/?post_type=wpq_article&#038;p=4087\"><span class=\"article-thumb wpq-related-link__thumb\"><img decoding=\"async\" alt=\"fields=ids\u3068\u306f\uff1fID\u3060\u3051\u53d6\u5f97\u3057\u3066\u9ad8\u901f\u5316\u3059\u308b\u4f7f\u3044\u65b9\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/09\/wp-query-fields-ids-card.png\" loading=\"lazy\" \/><\/span><div class=\"deep-link-copy wpq-related-link__copy\"><small>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/small><b>fields=ids\u3068\u306f\uff1fID\u3060\u3051\u53d6\u5f97\u3057\u3066\u9ad8\u901f\u5316\u3059\u308b\u4f7f\u3044\u65b9<\/b><span class=\"jump\"><span>\u8a18\u4e8b\u3092\u8aad\u3080<\/span><\/span><\/div><\/a><a class=\"deep-link-card wpq-related-link wpq-related-link--internal\" href=\"https:\/\/wptoolslab.com\/query-lab\/articles\/wp-query-random-display-cautions\/\"><span class=\"article-thumb wpq-related-link__thumb\"><img decoding=\"async\" alt=\"WP_Query\u3067\u30e9\u30f3\u30c0\u30e0\u8868\u793a\u3059\u308b\u3068\u304d\u306e\u6ce8\u610f\u70b9\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/08\/wp-query-random-display-cautions-card.png\" loading=\"lazy\" \/><\/span><div class=\"deep-link-copy wpq-related-link__copy\"><small>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/small><b>WP_Query\u3067\u30e9\u30f3\u30c0\u30e0\u8868\u793a\u3059\u308b\u3068\u304d\u306e\u6ce8\u610f\u70b9<\/b><span class=\"jump\"><span>\u8a18\u4e8b\u3092\u8aad\u3080<\/span><\/span><\/div><\/a><a class=\"deep-link-card wpq-related-link wpq-related-link--internal\" href=\"https:\/\/wptoolslab.com\/query-lab\/articles\/tax-query-filtering\/\"><span class=\"article-thumb wpq-related-link__thumb\"><img decoding=\"async\" alt=\"tax_query\u3068\u306f\uff1f\u30ab\u30c6\u30b4\u30ea\u30fb\u30bf\u30b0\u30fb\u30ab\u30b9\u30bf\u30e0\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u3067\u7d5e\u308a\u8fbc\u3080\u65b9\u6cd5\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/08\/tax-query-filtering-card-1.png\" loading=\"lazy\" \/><\/span><div class=\"deep-link-copy wpq-related-link__copy\"><small>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/small><b>tax_query\u3068\u306f\uff1f\u30ab\u30c6\u30b4\u30ea\u30fb\u30bf\u30b0\u30fb\u30ab\u30b9\u30bf\u30e0\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u3067\u7d5e\u308a\u8fbc\u3080\u65b9\u6cd5<\/b><span class=\"jump\"><span>\u8a18\u4e8b\u3092\u8aad\u3080<\/span><\/span><\/div><\/a><\/div>\n<h2 id=\"minimum-example\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"code\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"m18 16 4-4-4-4\" \/>\n  <path d=\"m6 8-4 4 4 4\" \/>\n  <path d=\"m14.5 4-5 16\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">\u30da\u30fc\u30b8\u9001\u308a\u306e\u306a\u3044\u5c0f\u3055\u306a\u4e00\u89a7\u3092\u898b\u76f4\u3059\u4f8b<\/span><\/h2>\n<p>\u6b21\u306f\u3001\u30da\u30fc\u30b8\u9001\u308a\u306e\u306a\u3044\u65b0\u77405\u4ef6\u3092\u30ea\u30f3\u30af\u4ed8\u304d\u3067\u8868\u793a\u3059\u308b\u4f8b\u3067\u3059\u3002\u30af\u30e9\u30b7\u30c3\u30af\u5b50\u30c6\u30fc\u30de\u306e`template-parts\/latest-posts.php`\u3078\u4fdd\u5b58\u3057\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30e1\u30a4\u30f3\u30eb\u30fc\u30d7\u5185\u3067`the_post()`\u306e\u5f8c\u306b`get_template_part( &#8216;template-parts\/latest-posts&#8217; );`\u3092\u547c\u3073\u307e\u3059\u3002\u6295\u7a3f\u672c\u6587\u3084`functions.php`\u306e\u76f4\u4e0b\u306b\u8cbc\u308b\u30b3\u30fc\u30c9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u6bd4\u8f03\u3067\u306f`no_found_rows`\u3060\u3051\u3092\u5909\u3048\u307e\u3059\u3002\u30e1\u30bf\u30fb\u30bf\u30fc\u30e0\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u6e96\u5099\u306f\u65e2\u5b9a\u306e\u307e\u307e\u306b\u3057\u3001\u8868\u793a\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3092\u4e0d\u7528\u610f\u306b\u7701\u304b\u306a\u3044\u5f62\u3067\u3059\u3002<\/p>\n<p>\u73fe\u5728\u306eWP Query Builder\u5b9f\u753b\u9762\u3067\u306f\u3001\u8a73\u7d30\u30e2\u30fc\u30c9\u304b\u3089\u300c\u6295\u7a3f\u30bf\u30a4\u30d7: post\u300d\u300c\u30b9\u30c6\u30fc\u30bf\u30b9: publish\u300d\u300c\u4ef6\u6570: 5\u300d\u300c\u4e26\u3073\u9806: DESC \/ date\u300d\u3092\u6307\u5b9a\u3057\u3001Performance \/ Cache\u3067`no_found_rows`\u3068`ignore_sticky_posts`\u3092`true`\u3001\u81ea\u52d5\u6700\u9069\u5316\u3092\u30aa\u30d5\u306b\u3057\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u751f\u6210\u3055\u308c\u305f\u6b21\u306e`$args`\u306f\u7de8\u96c6\u305b\u305a\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"code-panel wpq-code-block\"><div class=\"wpq-code-context wpq-code-context--template\"><span class=\"wpq-code-context__icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"folder-open\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\" \/>\n<\/svg><\/span><p>\u30af\u30e9\u30b7\u30c3\u30af\u30c6\u30fc\u30de\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff08\u307e\u305f\u306f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d1\u30fc\u30c4\uff09\u3067\u3001\u4e00\u89a7\u3092\u8868\u793a\u3057\u305f\u3044\u4f4d\u7f6e\u306b\u7f6e\u304f\u4f8b\u3067\u3059\u3002\u6295\u7a3f\u672c\u6587\u3084functions.php\u3078\u3001\u305d\u306e\u307e\u307e\u8cbc\u308b\u30b3\u30fc\u30c9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p><\/div><div class=\"code-head wpq-code-head\"><div class=\"code-meta wpq-code-meta\"><span class=\"code-lang wpq-code-pill wpq-code-pill--lang\">PHP<\/span><span class=\"code-filename wpq-code-pill\">template-parts\/latest-posts.php<\/span><span class=\"code-purpose wpq-code-pill\">\u30da\u30fc\u30b8\u9001\u308a\u306e\u306a\u3044\u65b0\u7740\u4e00\u89a7\u30925\u4ef6\u8868\u793a\u3059\u308b<\/span><\/div><button type=\"button\" class=\"copy-button wpq-copy-button\">\u30b3\u30d4\u30fc<\/button><\/div><pre data-wpq-code-region data-wpq-code-label=\"\u30b3\u30fc\u30c9\u4f8b: \u30da\u30fc\u30b8\u9001\u308a\u306e\u306a\u3044\u65b0\u7740\u4e00\u89a7\u30925\u4ef6\u8868\u793a\u3059\u308b \/ template-parts\/latest-posts.php \/ PHP\"><code><span class=\"wpq-code-line\">&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">&lt;?php&lt;br \/&gt;<\/span><span class=\"wpq-code-line\"><span class=\"c-var\">$args<\/span> = <span class=\"c-keyword\">array<\/span>(&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;post_type&#039;<\/span> =&gt; <span class=\"c-str\">&#039;post&#039;<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;post_status&#039;<\/span> =&gt; <span class=\"c-str\">&#039;publish&#039;<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;posts_per_page&#039;<\/span> =&gt; <span class=\"c-num\">5<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;order&#039;<\/span> =&gt; <span class=\"c-str\">&#039;DESC&#039;<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;orderby&#039;<\/span> =&gt; <span class=\"c-str\">&#039;date&#039;<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;no_found_rows&#039;<\/span> =&gt; <span class=\"c-keyword\">true<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">    <span class=\"c-key\">&#039;ignore_sticky_posts&#039;<\/span> =&gt; <span class=\"c-keyword\">true<\/span>&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">);&lt;\/p&gt;<\/span><span class=\"wpq-code-line\">&lt;p&gt;<span class=\"c-var\">$latest_posts<\/span> = <span class=\"c-keyword\">new<\/span> <span class=\"c-fn\">WP_Query<\/span>( <span class=\"c-var\">$args<\/span> );&lt;\/p&gt;<\/span><span class=\"wpq-code-line\">&lt;p&gt;<span class=\"c-keyword\">if<\/span> ( <span class=\"c-var\">$latest_posts<\/span>-&gt;have_posts() ) {&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">   <span class=\"c-keyword\">echo<\/span> <span class=\"c-str\">&#039;&lt;ul&gt;&#039;<\/span>;&lt;\/p&gt;<\/span><span class=\"wpq-code-line\">&lt;p&gt;   <span class=\"c-keyword\">while<\/span> ( <span class=\"c-var\">$latest_posts<\/span>-&gt;have_posts() ) {&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">      <span class=\"c-var\">$latest_posts<\/span>-&gt;the_post();&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">      printf(&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">         <span class=\"c-str\">&#039;&lt;li&gt;&lt;a href=&quot;%s&quot;&gt;%s&lt;\/a&gt;&lt;\/li&gt;&#039;<\/span>,&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">         esc_url( get_permalink() ),&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">         esc_html( get_the_title() )&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">      );&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">   }&lt;\/p&gt;<\/span><span class=\"wpq-code-line\">&lt;p&gt;   <span class=\"c-keyword\">echo<\/span> <span class=\"c-str\">&#039;&lt;\/ul&gt;&#039;<\/span>;&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">} <span class=\"c-keyword\">else<\/span> {&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">   <span class=\"c-keyword\">echo<\/span> <span class=\"c-str\">&#039;&lt;p&gt;\u516c\u958b\u6e08\u307f\u306e\u6295\u7a3f\u306f\u3042\u308a\u307e\u305b\u3093\u3002&lt;\/p&gt;&#039;<\/span>;&lt;br \/&gt;<\/span><span class=\"wpq-code-line\">}&lt;\/p&gt;<\/span><span class=\"wpq-code-line\">&lt;p&gt;wp_reset_postdata();&lt;br \/&gt;<\/span><\/code><\/pre><textarea class=\"wpq-code-raw\" hidden aria-hidden=\"true\" tabindex=\"-1\">&lt;br \/&gt;\n&lt;?php&lt;br \/&gt;\n$args = array(&lt;br \/&gt;\n    &#039;post_type&#039; =&gt; &#039;post&#039;,&lt;br \/&gt;\n    &#039;post_status&#039; =&gt; &#039;publish&#039;,&lt;br \/&gt;\n    &#039;posts_per_page&#039; =&gt; 5,&lt;br \/&gt;\n    &#039;order&#039; =&gt; &#039;DESC&#039;,&lt;br \/&gt;\n    &#039;orderby&#039; =&gt; &#039;date&#039;,&lt;br \/&gt;\n    &#039;no_found_rows&#039; =&gt; true,&lt;br \/&gt;\n    &#039;ignore_sticky_posts&#039; =&gt; true&lt;br \/&gt;\n);&lt;\/p&gt;\n&lt;p&gt;$latest_posts = new WP_Query( $args );&lt;\/p&gt;\n&lt;p&gt;if ( $latest_posts-&gt;have_posts() ) {&lt;br \/&gt;\n   echo &#039;&lt;ul&gt;&#039;;&lt;\/p&gt;\n&lt;p&gt;   while ( $latest_posts-&gt;have_posts() ) {&lt;br \/&gt;\n      $latest_posts-&gt;the_post();&lt;br \/&gt;\n      printf(&lt;br \/&gt;\n         &#039;&lt;li&gt;&lt;a href=&quot;%s&quot;&gt;%s&lt;\/a&gt;&lt;\/li&gt;&#039;,&lt;br \/&gt;\n         esc_url( get_permalink() ),&lt;br \/&gt;\n         esc_html( get_the_title() )&lt;br \/&gt;\n      );&lt;br \/&gt;\n   }&lt;\/p&gt;\n&lt;p&gt;   echo &#039;&lt;\/ul&gt;&#039;;&lt;br \/&gt;\n} else {&lt;br \/&gt;\n   echo &#039;&lt;p&gt;\u516c\u958b\u6e08\u307f\u306e\u6295\u7a3f\u306f\u3042\u308a\u307e\u305b\u3093\u3002&lt;\/p&gt;&#039;;&lt;br \/&gt;\n}&lt;\/p&gt;\n&lt;p&gt;wp_reset_postdata();&lt;br \/&gt;<\/textarea><\/div>\n<p>Builder\u304c\u751f\u6210\u3057\u305f\u306e\u306f`$args`\u307e\u3067\u3067\u3059\u3002\u7d9a\u304f`WP_Query`\u3001\u8868\u793a\u30eb\u30fc\u30d7\u30010\u4ef6\u6642\u306e\u6587\u3001\u30a8\u30b9\u30b1\u30fc\u30d7\u3001`wp_reset_postdata()`\u306f\u7528\u9014\u306b\u5408\u308f\u305b\u3066\u624b\u52d5\u3067\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u516c\u958b\u65e5\u6642\u306e\u964d\u9806\u306b\u3057\u3001\u5148\u982d\u56fa\u5b9a\u306b\u3088\u308b\u7279\u5225\u6271\u3044\u3092\u5916\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u540c\u3058\u516c\u958b\u65e5\u6642\u306e\u6295\u7a3f\u540c\u58eb\u307e\u3067\u9806\u756a\u3092\u56fa\u5b9a\u3059\u308b\u4f8b\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002`ignore_sticky_posts`\u306f\u56fa\u5b9a\u6295\u7a3f\u306e\u9664\u5916\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6700\u5f8c\u306b\u6295\u7a3f\u30c7\u30fc\u30bf\u3092\u5143\u3078\u623b\u3059\u305f\u3081\u3001\u5f8c\u7d9a\u306e\u30bf\u30a4\u30c8\u30eb\u3084\u30ea\u30f3\u30af\u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>`no_found_rows`\u3092`false`\u306b\u3057\u305f\u3082\u306e\u304c\u6bd4\u8f03\u7528\u306e\u5909\u66f4\u524d\u3001\u4e0a\u306e`true`\u304c\u5909\u66f4\u5f8c\u3067\u3059\u3002\u3069\u3061\u3089\u3082\u8868\u793a\u306f\u6700\u59275\u4ef6\u3067\u3059\u304c\u3001`true`\u3067\u306f`found_posts`\u3084`max_num_pages`\u3092\u7dcf\u4ef6\u6570\u30fb\u7dcf\u30da\u30fc\u30b8\u6570\u3068\u3057\u3066\u4f7f\u3048\u307e\u305b\u3093\u3002\u30da\u30fc\u30b8\u9001\u308a\u3084\u300c\u5168\u25cb\u4ef6\u300d\u3092\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306f\u3001\u3053\u306e\u6307\u5b9a\u3092\u898b\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"measured-example\" class=\"wpq-subheading\">\u540c\u30585\u4ef6\u304c\u51fa\u305f\u307e\u307e\u3001\u7dcf\u4ef6\u6570\u8a08\u7b97\u3060\u3051\u304c\u6e1b\u308b\u4f8b<\/h3>\n<p>\u8868\u793a\u4f8b\u306f\u30ed\u30fc\u30ab\u30ebWordPress\u306e\u516c\u958b\u6e08\u307f\u901a\u5e38\u6295\u7a3f23\u4ef6\u304b\u3089\u3001\u65b0\u3057\u30445\u4ef6\uff08ID82\u30fb81\u30fb80\u30fb79\u30fb15\uff09\u3092\u51fa\u3057\u305f\u3082\u306e\u3067\u3059\u3002`no_found_rows`\u3092\u5207\u308a\u66ff\u3048\u3066\u3082\u3001\u8868\u793a\u3059\u308b\u6295\u7a3f\u3068\u4e26\u3073\u9806\u306f\u5909\u308f\u308a\u307e\u305b\u3093\u3002<\/p>\n<figure class=\"wpq-screenshot-frame wpq-screenshot-frame--fit-contain\"><span class=\"wpq-screenshot-frame__media\" style=\"--wpq-screenshot-ratio:980 \/ 677;\"><img decoding=\"async\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/09\/wp-query-performance-SC-01-scaled.png\" alt=\"no_found_rows\u3092true\u306b\u3057\u305f\u672c\u6587\u30b3\u30fc\u30c9\u3067\u65b0\u77405\u4ef6\u3092\u8868\u793a\u3057\u305f\u30b5\u30a4\u30c8\" loading=\"lazy\" \/><\/span><figcaption class=\"wpq-screenshot-frame__caption\"><span class=\"wpq-screenshot-frame__eyebrow\">\u8868\u793a\u5185\u5bb9\u3092\u4fdd\u3064\u4f8b<\/span><strong class=\"wpq-screenshot-frame__title\">\u7dcf\u4ef6\u6570\u3092\u7701\u3044\u3066\u3082\u65b0\u77405\u4ef6\u306f\u540c\u3058<\/strong><p class=\"wpq-screenshot-frame__caption-text\">\u672c\u6587\u306ePHP\u304b\u3089\u65b0\u77405\u4ef6\u3092\u8868\u793a\u3002no_found_rows\u3092false\u306b\u3057\u305f\u5834\u5408\u3082\u540c\u30585\u4ef6\u30fb\u540c\u3058\u9806\u756a\u3067\u3059\u3002\u8868\u793a\u3055\u308c\u308b\u6295\u7a3f\u304c\u5909\u308f\u308b\u5909\u66f4\u3068\u306f\u5206\u3051\u3066\u6bd4\u8f03\u3057\u307e\u3059\u3002<\/p><\/figcaption><\/figure>\n<p>\u540c\u3058\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\uff08WordPress 7.1 \/ PHP 8.4.20 \/ MariaDB 11.8.6\u3001\u6c38\u7d9a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u306a\u3057\uff09\u3067\u3001\u5909\u66f4\u524d\u5f8c\u3092\u4ea4\u4e92\u306b10\u30ea\u30af\u30a8\u30b9\u30c8\u305a\u3064\u6bd4\u8f03\u3057\u305f\u7d50\u679c\u304c\u6b21\u306e\u8868\u3067\u3059\u3002\u6e2c\u3063\u305f\u306e\u306fPHP\u306e\u53d6\u5f97\u30fb\u8868\u793a\u30eb\u30fc\u30d7\u30fb\u30ea\u30bb\u30c3\u30c8\u307e\u3067\u3067\u3001\u30da\u30fc\u30b8\u5168\u4f53\u306e\u5fdc\u7b54\u6642\u9593\u3084\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u63cf\u753b\u6642\u9593\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<div class=\"wpq-table-block\"><p class=\"wpq-table-hint\" aria-hidden=\"true\">\u8868\u306f\u6a2a\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u304d\u307e\u3059<\/p><div class=\"cause-table table-scroll wpq-table-wrap\" role=\"region\" tabindex=\"0\" aria-label=\"\u8868: \u6bd4\u8f03\u9805\u76ee \/ false\uff08\u5909\u66f4\u524d\uff09 \/ true\uff08\u5909\u66f4\u5f8c\uff09\"><table class=\"article-table wpq-article-table\"><thead><tr><th>\u6bd4\u8f03\u9805\u76ee<\/th><th>false\uff08\u5909\u66f4\u524d\uff09<\/th><th>true\uff08\u5909\u66f4\u5f8c\uff09<\/th><\/tr><\/thead><tbody><tr><td>\u8868\u793a\u3057\u305f\u6295\u7a3fID<\/td><td>82\u30fb81\u30fb80\u30fb79\u30fb15<\/td><td>82\u30fb81\u30fb80\u30fb79\u30fb15<\/td><\/tr><tr><td>found_posts \/ max_num_pages<\/td><td>23 \/ 5<\/td><td>0 \/ 0\uff08\u7dcf\u6570\u306f\u672a\u53d6\u5f97\uff09<\/td><\/tr><tr><td>\u30ea\u30af\u30a8\u30b9\u30c8\u5185\u306e\u521d\u56deSQL\u6570<\/td><td>6\u56de<\/td><td>5\u56de<\/td><\/tr><tr><td>\u3046\u3061SELECT FOUND_ROWS()<\/td><td>1\u56de<\/td><td>0\u56de<\/td><\/tr><tr><td>\u521d\u56de\u306e\u4e00\u89a7\u751f\u6210\u6642\u9593\u306e\u4e2d\u592e\u5024<\/td><td>1.623ms<\/td><td>1.448ms<\/td><\/tr><tr><td>\u521d\u56de\u6642\u9593\u306e\u6700\u5c0f\u301c\u6700\u5927<\/td><td>1.020\u301c55.056ms<\/td><td>1.104\u301c5.928ms<\/td><\/tr><tr><td>\u540c\u3058\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u518d\u5ea6\u751f\u6210\u3057\u305f\u3068\u304d\u306eSQL\u6570<\/td><td>0\u56de<\/td><td>0\u56de<\/td><\/tr><\/tbody><\/table><\/div><\/div>\n<p>\u3053\u306e\u5c0f\u3055\u306a\u4f8b\u3067\u5206\u304b\u308b\u306e\u306f\u3001\u7dcf\u4ef6\u6570\u3092\u6c42\u3081\u308bSQL\u304c1\u56de\u6e1b\u308a\u3001\u8868\u793a\u7d50\u679c\u304c\u5909\u308f\u3089\u306a\u3044\u3053\u3068\u3067\u3059\u3002\u6642\u9593\u306b\u306f\u3070\u3089\u3064\u304d\u304c\u3042\u308a\u3001\u7bc4\u56f2\u3082\u91cd\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5dee\u304b\u3089\u672c\u756a\u3067\u3082\u4f53\u611f\u3067\u304d\u308b\u9ad8\u901f\u5316\u3084\u4e00\u5b9a\u306e\u6539\u5584\u7387\u3092\u4fdd\u8a3c\u3067\u304d\u307e\u305b\u3093\u3002\u540c\u3058\u30ea\u30af\u30a8\u30b9\u30c8\u306e2\u56de\u76ee\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u4f7f\u308f\u308c\u3001\u3069\u3061\u3089\u3082SQL\u304c0\u56de\u3067\u3057\u305f\u3002\u521d\u56de\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u5229\u7528\u6642\u3092\u6df7\u305c\u305a\u3001\u81ea\u5206\u306e\u30b5\u30a4\u30c8\u306e\u30c7\u30fc\u30bf\u91cf\u3067\u6e2c\u308a\u76f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n<p>\u30b3\u30fc\u30c9\u5074\u306e\u51e6\u7406\u3092\u5207\u308a\u5206\u3051\u305f\u5f8c\u3001\u672c\u756a\u3068\u306e\u901f\u5ea6\u5dee\u3092\u8abf\u3079\u308b\u6bb5\u968e\u3067\u306f\u3001PHP\u30fb\u30ad\u30e3\u30c3\u30b7\u30e5\u30fb\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u3069\u306e\u904b\u7528\u6761\u4ef6\u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002Xserver\u306e\u516c\u5f0f\u60c5\u5831\u3092\u6bd4\u8f03\u6750\u6599\u306b\u3067\u304d\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u5909\u66f4\u3060\u3051\u3067\u6539\u5584\u3059\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n<h2 id=\"builder\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"builder\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"m18 16 4-4-4-4\" \/>\n  <path d=\"m6 8-4 4 4 4\" \/>\n  <path d=\"m14.5 4-5 16\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">\u8907\u96d1\u306a$args\u306f\u3001\u307e\u305a\u69cb\u9020\u3092\u6574\u7406\u3059\u308b<\/span><\/h2>\n<p>\u6761\u4ef6\u3092\u7d99\u304e\u8db3\u3057\u3066\u914d\u5217\u306e\u5f79\u5272\u304c\u5206\u304b\u3089\u306a\u304f\u306a\u3063\u305f\u5834\u5408\u306f\u3001WP Query Builder\u3067`$args`\u3092\u7d44\u307f\u76f4\u305b\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30b5\u30fc\u30d0\u30fc\u3092\u76f4\u63a5\u901f\u304f\u3059\u308b\u6a5f\u80fd\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u751f\u6210\u5f8c\u306b\u4e0d\u8981\u306a\u6761\u4ef6\u3092\u6e1b\u3089\u3057\u3001\u5909\u66f4\u524d\u5f8c\u3092\u8a08\u6e2c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"wpq-related-links\"><a class=\"deep-link-card wpq-related-link wpq-related-link--internal\" href=\"https:\/\/wptoolslab.com\/query-lab\/?post_type=wpq_article&#038;p=4084\"><span class=\"article-thumb wpq-related-link__thumb\"><img decoding=\"async\" alt=\"WP Query Builder\u306e\u4f7f\u3044\u65b9\u3002\u6761\u4ef6\u8a2d\u5b9a\u304b\u3089\u30b3\u30fc\u30c9\u751f\u6210\u307e\u3067\" src=\"https:\/\/wptoolslab.com\/query-lab\/wp-content\/uploads\/2026\/09\/wp-query-builder-how-to-card.png\" loading=\"lazy\" \/><\/span><div class=\"deep-link-copy wpq-related-link__copy\"><small>\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/small><b>WP Query Builder\u306e\u4f7f\u3044\u65b9\u3002\u6761\u4ef6\u8a2d\u5b9a\u304b\u3089\u30b3\u30fc\u30c9\u751f\u6210\u307e\u3067<\/b><span class=\"jump\"><span>\u8a18\u4e8b\u3092\u8aad\u3080<\/span><\/span><\/div><\/a><\/div>\n\n<p>\u53d6\u5f97\u4ef6\u6570\u3001\u7dcf\u4ef6\u6570\u8a08\u7b97\u3001\u8fd4\u308a\u5024\u306e\u7bc4\u56f2\u3092\u898b\u76f4\u3057\u305f\u3089\u3001\u5909\u66f4\u5019\u88dc\u306e$args\u3092\u4e00\u5ea6\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<section class=\"builder-cta wpq-builder-panel\"><div class=\"builder-icon\" aria-hidden=\"true\"><\/div><div class=\"wpq-builder-panel__copy\"><h3>\u9ad8\u901f\u5316\u5019\u88dc\u306e$args\u3092\u6574\u7406\u3059\u308b<\/h3><p>posts_per_page\u3001no_found_rows\u3001fields\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u95a2\u9023\u5f15\u6570\u3092\u898b\u6bd4\u3079\u3066\u30b3\u30fc\u30c9\u3092\u4f5c\u308c\u307e\u3059\u3002\u751f\u6210\u5f8c\u306f\u8868\u793a\u7d50\u679c\u3068\u51e6\u7406\u6642\u9593\u3092\u5fc5\u305a\u518d\u8a08\u6e2c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p><\/div><div class=\"builder-actions wpq-builder-panel__actions\"><a class=\"button wpq-button wpq-button--primary\" href=\"https:\/\/wptoolslab.com\/query-builder\/\">WP Query Builder\u3067\u30af\u30a8\u30ea\u3092\u4f5c\u308b<\/a><\/div><\/section>\n\n<h2 id=\"cache-and-remeasure\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"refresh\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" \/>\n  <path d=\"M21 3v5h-5\" \/>\n  <path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" \/>\n  <path d=\"M8 16H3v5\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">\u6700\u5f8c\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u518d\u8a08\u6e2c\u3092\u8003\u3048\u308b<\/span><\/h2>\n<p>\u53d6\u5f97\u4ef6\u6570\u3084\u30eb\u30fc\u30d7\u5185\u51e6\u7406\u3092\u898b\u76f4\u3057\u305f\u5f8c\u3082\u540c\u3058\u30af\u30a8\u30ea\u3092\u7e70\u308a\u8fd4\u3059\u306a\u3089\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002\u4fdd\u5b58\u671f\u9593\u3068\u5931\u52b9\u6761\u4ef6\u3092\u6c7a\u3081\u3001\u5909\u66f4\u524d\u3068\u540c\u3058\u6761\u4ef6\u3067\u3082\u3046\u4e00\u5ea6\u6e2c\u308a\u307e\u3059\u3002<\/p>\n<h3 id=\"cache\" class=\"wpq-subheading\">6. \u30af\u30a8\u30ea\u3092\u5c0f\u3055\u304f\u3057\u305f\u5f8c\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u691c\u8a0e\u3059\u308b<\/h3>\n<p>\u540c\u3058\u6761\u4ef6\u306e\u4e00\u89a7\u3092\u7e70\u308a\u8fd4\u3057\u4f5c\u308a\u3001\u5143\u30c7\u30fc\u30bf\u304c\u983b\u7e41\u306b\u5909\u308f\u3089\u306a\u3044\u306a\u3089\u7d50\u679c\u306e\u518d\u5229\u7528\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002Transients API\u306f\u3001\u8a08\u7b97\u7d50\u679c\u3084ID\u4e00\u89a7\u306a\u3069\u3092\u671f\u9650\u4ed8\u304d\u3067\u4e00\u6642\u4fdd\u5b58\u3057\u3001\u540c\u3058\u51e6\u7406\u306e\u7e70\u308a\u8fd4\u3057\u3092\u6e1b\u3089\u3059WordPress\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\n<p>\u6c38\u7d9a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u7121\u3092\u78ba\u8a8d\u3057\u3001Transients\u3092\u4f7f\u3046\u306a\u3089\u6295\u7a3f\u30bf\u30a4\u30d7\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3001\u30da\u30fc\u30b8\u756a\u53f7\u3001\u8a00\u8a9e\u306a\u3069\u7d50\u679c\u3092\u5909\u3048\u308b\u6761\u4ef6\u3092\u30ad\u30fc\u3078\u542b\u3081\u307e\u3059\u3002<\/p>\n<p>\u4fdd\u5b58\u3057\u305f\u5024\u304c\u898b\u3064\u304b\u3089\u306a\u3051\u308c\u3070WP_Query\u3092\u5b9f\u884c\u3057\u3066\u518d\u751f\u6210\u3057\u3001\u6295\u7a3f\u306e\u516c\u958b\u30fb\u66f4\u65b0\u30fb\u524a\u9664\u3067\u7d50\u679c\u304c\u5909\u308f\u308b\u6642\u306f\u3001\u95a2\u4fc2\u3059\u308bTransient\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u4fdd\u5b58\u671f\u9593\u5185\u3067\u3082\u5024\u304c\u6d88\u3048\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001\u5e38\u306b\u518d\u751f\u6210\u3067\u304d\u308b\u51e6\u7406\u3092\u6b8b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6a29\u9650\u3084\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u3063\u3066\u7d50\u679c\u304c\u9055\u3046\u4e00\u89a7\u306f\u3001\u540c\u3058\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5171\u6709\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"remeasure\" class=\"wpq-subheading\">7. \u8868\u793a\u7d50\u679c\u3092\u4fdd\u3063\u305f\u307e\u307e\u901f\u304f\u306a\u3063\u305f\u304b\u518d\u8a08\u6e2c\u3059\u308b<\/h3>\n<p>\u5909\u66f4\u5f8c\u306f\u3001\u6642\u9593\u3060\u3051\u3067\u306a\u304f\u3001\u8868\u793a\u4ef6\u6570\u3001\u4e26\u3073\u9806\u3001\u30da\u30fc\u30b8\u9001\u308a\u3001\u5148\u982d\u56fa\u5b9a\u8868\u793a\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u5909\u308f\u3063\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<span class=\"wpq-marker wpq-marker--yellow\">\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8ffd\u52a0\u3057\u305f\u5834\u5408\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u306a\u3044\u521d\u56de\u8868\u793a\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u4f7f\u308f\u308c\u308b2\u56de\u76ee\u4ee5\u964d\u3001\u6295\u7a3f\u3092\u66f4\u65b0\u3057\u305f\u76f4\u5f8c\u306e3\u3064\u3092\u5206\u3051\u3066\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span>\n<section class=\"debug-steps wpq-steps-card\"><h2>\u9ad8\u901f\u5316\u306e\u78ba\u8a8d\u9806<\/h2><ol class=\"step-list wpq-steps\"><li><span class=\"step-number wpq-step-no\">1<\/span><div class=\"step-body wpq-step-body\">\u540c\u3058URL\u30fb\u540c\u3058\u6295\u7a3f\u30c7\u30fc\u30bf\u3067\u5909\u66f4\u524d\u306e\u6642\u9593\u3068\u30af\u30a8\u30ea\u6570\u3092\u8a18\u9332\u3059\u308b<\/div><\/li><li><span class=\"step-number wpq-step-no\">2<\/span><div class=\"step-body wpq-step-body\">\u53d6\u5f97\u4ef6\u6570\u3001\u7dcf\u4ef6\u6570\u3001\u53d6\u5f97\u9805\u76ee\u3001\u8ffd\u52a0\u30af\u30a8\u30ea\u3092\u4e00\u3064\u305a\u3064\u898b\u76f4\u3059<\/div><\/li><li><span class=\"step-number wpq-step-no\">3<\/span><div class=\"step-body wpq-step-body\">\u6761\u4ef6\u3068\u4e26\u3073\u9806\u3092\u7c21\u5358\u306b\u3067\u304d\u306a\u3044\u304b\u78ba\u8a8d\u3059\u308b<\/div><\/li><li><span class=\"step-number wpq-step-no\">4<\/span><div class=\"step-body wpq-step-body\">\u5fc5\u8981\u306a\u5834\u5408\u3060\u3051\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8ffd\u52a0\u3059\u308b<\/div><\/li><li><span class=\"step-number wpq-step-no\">5<\/span><div class=\"step-body wpq-step-body\">\u5909\u66f4\u5f8c\u306e\u6642\u9593\u3001\u30af\u30a8\u30ea\u6570\u3001\u8868\u793a\u7d50\u679c\u3001\u66f4\u65b0\u76f4\u5f8c\u306e\u6319\u52d5\u3092\u518d\u78ba\u8a8d\u3059\u308b<\/div><\/li><\/ol><\/section>\n<h2 id=\"official-docs\" class=\"h-underline section-heading\"><span class=\"section-heading-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"book\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M12 5v16\" \/>\n  <path d=\"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z\" \/>\n<\/svg><\/span><span class=\"section-heading-text\">WP_Query\u306e\u8a08\u6e2c\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u516c\u5f0f\u8cc7\u6599<\/span><\/h2>\n<p>\u5f15\u6570\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001Transients\u3001Query Monitor\u306e\u4ed5\u69d8\u306f\u516c\u5f0f\u8cc7\u6599\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<section class=\"official-docs-card wpq-reference-card wpq-reference-card--official\"><div class=\"official-docs-head\"><span class=\"official-docs-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"book\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M12 5v16\" \/>\n  <path d=\"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z\" \/>\n<\/svg><\/span><div><p class=\"eyebrow wpq-eyebrow\">\u516c\u5f0f\u30ea\u30f3\u30af<\/p><h2>WP_Query\u9ad8\u901f\u5316\u306e\u516c\u5f0f\u8cc7\u6599<\/h2><\/div><\/div><ul class=\"wpq-reference-list\"><li class=\"wpq-reference-item\"><a class=\"wpq-reference-item__link\" href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"wpq-reference-item__copy\"><strong class=\"wpq-reference-item__title\">WP_Query\u30af\u30e9\u30b9\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/strong><span class=\"wpq-reference-item__description\">no_found_rows\u3001fields\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u95a2\u9023\u5f15\u6570\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/span><span class=\"wpq-reference-item__hint\" aria-hidden=\"true\"><svg data-wpq-icon=\"external\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M15 3h6v6\" \/>\n  <path d=\"M10 14 21 3\" \/>\n  <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" \/>\n<\/svg><\/span><\/a><\/li><li class=\"wpq-reference-item\"><a class=\"wpq-reference-item__link\" href=\"https:\/\/developer.wordpress.org\/advanced-administration\/performance\/optimization\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"wpq-reference-item__copy\"><strong class=\"wpq-reference-item__title\">WordPress\u306e\u6700\u9069\u5316<\/strong><span class=\"wpq-reference-item__description\">\u30b5\u30fc\u30d0\u30fc\u3068WordPress\u5168\u4f53\u306e\u6539\u5584\u89b3\u70b9\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/span><span class=\"wpq-reference-item__hint\" aria-hidden=\"true\"><svg data-wpq-icon=\"external\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M15 3h6v6\" \/>\n  <path d=\"M10 14 21 3\" \/>\n  <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" \/>\n<\/svg><\/span><\/a><\/li><li class=\"wpq-reference-item\"><a class=\"wpq-reference-item__link\" href=\"https:\/\/developer.wordpress.org\/advanced-administration\/performance\/cache\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"wpq-reference-item__copy\"><strong class=\"wpq-reference-item__title\">WordPress\u306e\u30ad\u30e3\u30c3\u30b7\u30e5<\/strong><span class=\"wpq-reference-item__description\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30e3\u30c3\u30b7\u30e5\u7b49\u306e\u4ed5\u7d44\u307f\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/span><span class=\"wpq-reference-item__hint\" aria-hidden=\"true\"><svg data-wpq-icon=\"external\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M15 3h6v6\" \/>\n  <path d=\"M10 14 21 3\" \/>\n  <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" \/>\n<\/svg><\/span><\/a><\/li><li class=\"wpq-reference-item\"><a class=\"wpq-reference-item__link\" href=\"https:\/\/developer.wordpress.org\/apis\/transients\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"wpq-reference-item__copy\"><strong class=\"wpq-reference-item__title\">Transients API<\/strong><span class=\"wpq-reference-item__description\">\u671f\u9650\u4ed8\u304d\u30c7\u30fc\u30bf\u3068\u65e9\u671f\u5931\u52b9\u306e\u6271\u3044\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/span><span class=\"wpq-reference-item__hint\" aria-hidden=\"true\"><svg data-wpq-icon=\"external\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M15 3h6v6\" \/>\n  <path d=\"M10 14 21 3\" \/>\n  <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" \/>\n<\/svg><\/span><\/a><\/li><li class=\"wpq-reference-item\"><a class=\"wpq-reference-item__link\" href=\"https:\/\/wordpress.org\/plugins\/query-monitor\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"wpq-reference-item__copy\"><strong class=\"wpq-reference-item__title\">Query Monitor<\/strong><span class=\"wpq-reference-item__description\">\u30af\u30a8\u30ea\u3001PHP\u30a8\u30e9\u30fc\u3001HTTP API\u7b49\u306e\u8a3a\u65ad\u6a5f\u80fd\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/span><span class=\"wpq-reference-item__hint\" aria-hidden=\"true\"><svg data-wpq-icon=\"external\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M15 3h6v6\" \/>\n  <path d=\"M10 14 21 3\" \/>\n  <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" \/>\n<\/svg><\/span><\/a><\/li><\/ul><\/section>\n<section class=\"final-checklist wpq-checklist-card wpq-checklist-card--final\"><div class=\"final-checklist-head\"><span class=\"final-checklist-icon\" aria-hidden=\"true\"><svg data-wpq-icon=\"check\" aria-hidden=\"true\" focusable=\"false\" class=\"wpq-icon-svg\"\n  xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n \n \n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M20 6 9 17l-5-5\" \/>\n<\/svg><\/span><h2>\u516c\u958b\u524d\u306e\u6700\u7d42\u78ba\u8a8d<\/h2><\/div><ul class=\"wpq-checklist\"><li>\u5909\u66f4\u524d\u5f8c\u3092\u540c\u3058URL\u30fb\u6295\u7a3f\u30c7\u30fc\u30bf\u3067\u8a08\u6e2c\u3057\u305f<\/li><li>\u53d6\u5f97\u4ef6\u6570\u3001\u7dcf\u4ef6\u6570\u3001fields\u3001\u30eb\u30fc\u30d7\u5185\u306e\u8ffd\u52a0\u53d6\u5f97\u3092\u76ee\u7684\u306b\u5408\u308f\u305b\u305f<\/li><li>\u30da\u30fc\u30b8\u9001\u308a\u304c\u3042\u308b\u4e00\u89a7\u3078no_found_rows\u3092\u5165\u308c\u3066\u3044\u306a\u3044<\/li><li>\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30ad\u30fc\u3001\u5931\u52b9\u3001\u518d\u751f\u6210\u3092\u6c7a\u3081\u305f<\/li><li>\u4ef6\u6570\u3001\u4e26\u3073\u9806\u3001\u30da\u30fc\u30b8\u9001\u308a\u3001\u66f4\u65b0\u76f4\u5f8c\u306e\u8868\u793a\u3092\u78ba\u8a8d\u3057\u305f<\/li><\/ul><\/section>\n","protected":false},"excerpt":{"rendered":"<p>WP_Query\u304c\u91cd\u3044\u3068\u611f\u3058\u305f\u3068\u304d\u306b\u3001\u539f\u56e0\u3092\u6e2c\u3063\u3066\u304b\u3089\u9ad8\u901f\u5316\u3059\u308b\u624b\u9806\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u53d6\u5f97\u4ef6\u6570\u3001\u7dcf\u4ef6\u6570\u3001fields\u3001N+1\u3001\u6761\u4ef6\u30fb\u4e26\u3073\u9806\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u9806\u306b\u898b\u76f4\u3057\u3001\u5909\u66f4\u524d\u5f8c\u3092\u540c\u3058\u6761\u4ef6\u3067\u6bd4\u3079\u307e\u3059\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"template":"","meta":{"wpq_kicker":"WP_Query\u9ad8\u901f\u5316","wpq_lead":"\u30da\u30fc\u30b8\u8868\u793a\u304c\u9045\u3044\u3068\u3001WP_Query\u306e\u5f15\u6570\u3092\u3059\u3050\u5909\u3048\u305f\u304f\u306a\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u539f\u56e0\u304c\u753b\u50cf\u3001\u5916\u90e8\u901a\u4fe1\u3001PHP\u51e6\u7406\u306a\u3089\u3001\u30af\u30a8\u30ea\u3060\u3051\u3092\u76f4\u3057\u3066\u3082\u6539\u5584\u3057\u307e\u305b\u3093\u3002\u307e\u305a\u9045\u3044\u5834\u6240\u3092\u6e2c\u308a\u3001\u53d6\u5f97\u91cf\u3068\u4e0d\u8981\u306a\u51e6\u7406\u3092\u6e1b\u3089\u3057\u3001\u5fc5\u8981\u306a\u5834\u5408\u3060\u3051\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002","wpq_hero_title_line1":"","wpq_hero_title_line2":"","wpq_hero_title_accent":"","wpq_hero_thumbnail_alt":"WP_Query\u304c\u91cd\u3044\u3068\u304d\u306e\u9ad8\u901f\u5316\u65b9\u6cd5\uff5c\u539f\u56e0\u306e\u6e2c\u308a\u65b9\u3068\u6539\u5584\u624b\u9806 \u306e\u30d2\u30fc\u30ed\u30fc\u30b5\u30e0\u30cd\u30a4\u30eb","wpq_hero_summary_mode":"","wpq_hero_summary_label":"\u6539\u5584\u3059\u308b\u9806\u756a","wpq_hero_summary_items":"\u8a08\u6e2c::\u5148\u306b\u9045\u3044\u5834\u6240\u3092\u7279\u5b9a\n\u53d6\u5f97\u91cf::\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u7d5e\u308b","wpq_reading_time":"","wpq_difficulty_label":"","wpq_difficulty_stars":"3","wpq_target_audience":"WP_Query\u3067\u8a18\u4e8b\u4e00\u89a7\u3084\u95a2\u9023\u8a18\u4e8b\u3092\u4f5c\u3063\u305f\u3042\u3068\u3001\u8868\u793a\u901f\u5ea6\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8ca0\u8377\u304c\u6c17\u306b\u306a\u308a\u59cb\u3081\u305fWordPress\u521d\u7d1a\u301c\u4e2d\u7d1a\u8005","wpq_updated_label":"","wpq_summary_items":"","wpq_scope_include":"","wpq_scope_exclude":"","wpq_quick_checks":"","wpq_sidebar_notes":"","wpq_sidebar_promo_text":"","wpq_sidebar_promo_label":"","wpq_sidebar_promo_url":"","wpq_builder_fields":"","wpq_official_links":"WP_Query\u30af\u30e9\u30b9\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9|https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/\nWordPress\u306e\u6700\u9069\u5316|https:\/\/developer.wordpress.org\/advanced-administration\/performance\/optimization\/\nWordPress\u306e\u30ad\u30e3\u30c3\u30b7\u30e5|https:\/\/developer.wordpress.org\/advanced-administration\/performance\/cache\/\nTransients API|https:\/\/developer.wordpress.org\/apis\/transients\/\nQuery Monitor|https:\/\/wordpress.org\/plugins\/query-monitor\/","wpq_pr_notice":"","wpq_affiliate_placement":"inline","wpq_affiliate_program":"xserver","wpq_affiliate_context":"performance","wpq_support_mode":"","wpq_popularity_score":"","wpq_author_box_name":"","wpq_author_box_role":"","wpq_author_box_body":"","wpq_author_box_avatar":"","wpq_author_box_avatar_url":"","wpq_author_avatar_url":"","wpq_reader_avatar_url":"","wpq_editor_avatar_url":"","footnotes":""},"categories":[110],"tags":[120,106,119,118],"wpq_card_label":[6],"wpq_difficulty":[12],"class_list":["post-3877","wpq_article","type-wpq_article","status-publish","hentry","category-110","tag-fields","tag-no_found_rows","tag-query-monitor","tag-118"],"_links":{"self":[{"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_article\/3877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_article"}],"about":[{"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/types\/wpq_article"}],"author":[{"embeddable":true,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":3,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_article\/3877\/revisions"}],"predecessor-version":[{"id":4058,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_article\/3877\/revisions\/4058"}],"wp:attachment":[{"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/media?parent=3877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/categories?post=3877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/tags?post=3877"},{"taxonomy":"wpq_card_label","embeddable":true,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_card_label?post=3877"},{"taxonomy":"wpq_difficulty","embeddable":true,"href":"https:\/\/wptoolslab.com\/query-lab\/wp-json\/wp\/v2\/wpq_difficulty?post=3877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}