{"id":7370,"date":"2019-08-09T10:00:10","date_gmt":"2019-08-09T17:00:10","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=7370"},"modified":"2023-05-19T04:44:06","modified_gmt":"2023-05-19T11:44:06","slug":"index-advisor-for-n1ql-query-statement","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/ko\/index-advisor-for-n1ql-query-statement\/","title":{"rendered":"N1QL \ucffc\ub9ac \ubb38\uc6a9 \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800"},"content":{"rendered":"<h3>\uac1c\uc694<\/h3>\n<p>\uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \uc11c\ubc84 6.5\uc5d0 \uac1c\ubc1c\uc790 \ubbf8\ub9ac \ubcf4\uae30 \uae30\ub2a5\uc73c\ub85c \ub3c4\uc785\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc774 \uae30\ub2a5\uc740 DBA\uc640 \uac1c\ubc1c\uc790\uac00 N1QL \ucffc\ub9ac \uc131\ub2a5\uc744 \ucd5c\uc801\ud654\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub418\ub294 \ubcf4\uc870 \uc778\ub371\uc2a4 \ucd94\ucc9c\uc744 \uc81c\uacf5\ud558\ub294 \uac83\uc744 \ubaa9\ud45c\ub85c \ud569\ub2c8\ub2e4. \uc774 \ubc84\uc804\uc740 \uaddc\uce59 \uae30\ubc18\uc774\uba70, \uc778\ub371\uc2a4 \ud6c4\ubcf4\uac00 \ub2e4\uc74c\uc5d0\uc11c \uc9c0\uc815\ub41c \ub514\uc790\uc778 \uaddc\uce59\uc5d0 \ub530\ub77c \uc0dd\uc131\ub429\ub2c8\ub2e4. <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/create-right-index-get-right-performance\/\">https:\/\/www.couchbase.com\/blog\/create-right-index-get-right-performance\/:<\/a><\/p>\n<p style=\"padding-left: 40px\">1. \uc5b8\ub124\uc2a4\ud2b8\uc5d0 \ub300\ud55c \uc120\ud589 \ubc30\uc5f4 \uc778\ub371\uc2a4 \ud0a4<\/p>\n<p style=\"padding-left: 40px\">2. \ub3d9\uc77c\uc131 \uc220\uc5b4<\/p>\n<p style=\"padding-left: 40px\">3. IN \uc220\uc5b4<\/p>\n<p style=\"padding-left: 40px\">4. \uc220\uc5b4\ubcf4\ub2e4 \uc791\uc9c0 \uc54a\uc74c\/\uc0ac\uc774\/\ubcf4\ub2e4 \ud06c\uc9c0 \uc54a\uc74c<\/p>\n<p style=\"padding-left: 40px\">5. \uc220\uc5b4\ubcf4\ub2e4 \uc791\uc74c\/\ubcf4\ub2e4 \ud07c<\/p>\n<p style=\"padding-left: 40px\">6. \ubc30\uc5f4 \uc220\uc5b4<\/p>\n<p style=\"padding-left: 40px\">7. \uc67c\ucabd \ud0a4 \uacf5\uac04\uc758 \uc120\ud589 \ud0a4\ub85c \ud30c\uc0dd\ub41c \uc870\uc778 \ud544\ud130<\/p>\n<p style=\"padding-left: 40px\">8. IS NOT NULL\/\ub204\ub77d\/\uac12\uc774 \uc5c6\ub294 \uc220\uc5b4<\/p>\n<p style=\"padding-left: 40px\">9. \uae30\ub2a5 \uc220\uc5b4<\/p>\n<p style=\"padding-left: 40px\">10. \ubd80\ubd84 \uc778\ub371\uc2a4 \uc870\uac74<\/p>\n<p>\uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \ub450 \uac00\uc9c0 \ubc29\uc2dd\uc73c\ub85c \uc791\ub3d9\ud558\ub3c4\ub85d \uc124\uacc4\ub418\uc5c8\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>N1QL \ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub2e8\uc77c \ucffc\ub9ac\uc5d0 \ub300\ud55c \uc778\ub371\uc2a4\ub97c \uc870\uc5b8\ud569\ub2c8\ub2e4.<\/li>\n<li>\ucffc\ub9ac \uc6cc\ud06c\ub85c\ub4dc\uc5d0 \ub300\ud574 \uc870\uc5b8\ud558\uace0 \uc138\uc158 \ucc98\ub9ac\ub97c \uc9c0\uc6d0\ud558\ub294 \uc5b4\ub4dc\ubc14\uc774\uc800 \uae30\ub2a5.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\uc774 \uae00\uc5d0\uc11c\ub294 \uccab \ubc88\uc9f8 \uae30\ub2a5\uc5d0 \ucd08\uc810\uc744 \ub9de\ucd94\uace0 \ub0b4\ubd80\uc801\uc73c\ub85c \uc5b4\ub5bb\uac8c \uc791\ub3d9\ud558\ub294\uc9c0\uc5d0 \ub300\ud55c \uba87 \uac00\uc9c0 \uc778\uc0ac\uc774\ud2b8\ub97c \uacf5\uc720\ud558\uace0\uc790 \ud569\ub2c8\ub2e4.<\/p>\n<h3>\uc5b4\ub4dc\ubc14\uc774\uc2a4 \uc131\uba85\uc11c \uc138\ubd80 \uc815\ubcf4<\/h3>\n<p>N1QL \ubb38 \uad6c\ubb38:<\/p>\n<p style=\"text-align: left;padding-left: 40px\">\uc790\ubb38 [\uc778\ub371\uc2a4 ]<\/p>\n<p>SELECT\/\uc0ad\uc81c\/\uc5c5\ub370\uc774\ud2b8\/ANSI MERGE\uc758 \ucffc\ub9ac \uc720\ud615\uc744 \uc9c0\uc6d0\ud558\uba70, \ub2e8\uc77c \ud0a4 \uacf5\uac04\uc5d0 \ub300\ud55c \uc791\uc5c5, ANSI JOIN\/NEST, INDEX JOIN\/NEST, UNNEST \ubc0f FROM \uc808\uc758 \ud558\uc704 \ucffc\ub9ac\uc5d0 \ub300\ud55c \uc778\ub371\uc2a4 \uad8c\uc7a5 \uc0ac\ud56d\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\uac00 \ub530\ub974\ub294 \uae30\ubcf8 \uc9c0\uce68\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>\uc62c\ubc14\ub978 \uad6c\ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc778\ub371\uc2f1 \uac00\ub2a5\ud55c \uc220\uc5b4, \ud22c\uc0ac, GROUP BY\/ORDER BY \ud45c\ud604\uc2dd\uc744 \uae30\ubc18\uc73c\ub85c \ubcf4\uc870 \uc778\ub371\uc2a4 \ud6c4\ubcf4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li>UNNEST\uc758 \uacbd\uc6b0 \uc120\ud589 \ubc30\uc5f4 \uc778\ub371\uc2a4 \ud0a4\uc5d0 \ub300\ud55c \uc870\uc815\uacfc ANSI JOIN\uc758 \uacbd\uc6b0 \ud30c\uc0dd\ub41c ISNOTNULL \ud544\ud130\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc220\uc5b4 \uc720\ud615\uc758 \uc6b0\uc120 \uc21c\uc704\uc5d0 \ub530\ub978 \uaddc\uce59\uc5d0 \ub530\ub77c \uc778\ub371\uc2a4 \ud0a4\ub97c \uc815\ub82c\ud569\ub2c8\ub2e4.<\/li>\n<li>\uad8c\uc7a5 \uc778\ub371\uc2a4\uac00 \ud604\uc7ac \ubaa8\ub4e0 \uae30\uc874\/\uc720\uc608 \uc778\ub371\uc2a4\ubcf4\ub2e4 \uc6b0\uc218\ud574\uc57c \ud558\uba70 \ucffc\ub9ac \uc2e4\ud589 \uc2dc \ud604\uc7ac \uaddc\uce59 \uae30\ubc18 \ucffc\ub9ac \ucd5c\uc801\ud654 \ub3c4\uad6c\uc5d0 \uc758\ud574 \uc120\ud0dd\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\uba3c\uc800 \uac04\ub2e8\ud55c \uc608\uc81c\uc758 \uacb0\uacfc\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<p>\ucffc\ub9ac 1:<\/p>\n<pre class=\"lang:default decode:true\">ADVISE SELECT name FROM `travel-sample` WHERE id &lt; 100 AND type = \u201croute\u201d<\/pre>\n<pre class=\"lang:default decode:true\">[\r\n  {\r\n    \"#operator\": \"Advise\",\r\n    \"advice\": {\r\n      \"#operator\": \"IndexAdvice\",\r\n      \"adviseinfo\": [\r\n        {\r\n          \"current_indexes\": [\r\n            {\r\n              \"index_statement\": \"CREATE INDEX def_type ON `travel-sample`(`type`)\"\r\n            }\r\n          ],\r\n          \"recommended_indexes\": {\r\n            \"covering_indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_id_type_name ON `travel-sample`(`id`,`name`) WHERE `type` = 'route'\"\r\n              }\r\n            ],\r\n            \"indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_id_type ON `travel-sample`(`id`) WHERE `type` = 'route'\",\r\n                \"recommending_rule\": \"Index keys follow order of predicate types: 5. less than\/between\/greater than, 10. flavor for partial index.\"\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      ]\r\n    },\r\n    \"query\": \"select name from `travel-sample` where id &lt; 100 and type = \\\"route\\\";\"\r\n  }\r\n]\r\n<\/pre>\n<p>\uc870\uc5b8 \ucd9c\ub825\uc5d0\ub294 \ub450 \uac00\uc9c0 \ubd80\ubd84\uc774 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\ud604\uc7ac \uc778\ub371\uc2a4:<\/li>\n<\/ul>\n<p style=\"padding-left: 40px\">\uc774 \uc138\uc158\uc5d0\uc11c\ub294 \uc785\ub825 \ucffc\ub9ac\ub97c \uc2e4\ud589\ud558\uae30 \uc704\ud574 \ucffc\ub9ac \uc635\ud2f0\ub9c8\uc774\uc800\uac00 \ud604\uc7ac \uc0ac\uc6a9\ud558\uace0 \uc788\ub294 \uc778\ub371\uc2a4\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. \ub610\ud55c \uc778\ub371\uc2a4\uac00 \uad8c\uc7a5 \uc778\ub371\uc2a4\uc640 \ub3d9\uc77c\ud558\uac70\ub098 \ucd5c\uc801\uc758 \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\uc778 \uacbd\uc6b0 \uc778\ub371\uc2a4\uc758 \uc0c1\ud0dc\uc5d0 \ub300\ud55c \uc815\ubcf4\ub3c4 \ud3ec\ud568\ub429\ub2c8\ub2e4. \ub450 \uacbd\uc6b0 \ubaa8\ub450 \uc778\ub371\uc2a4 \ucd94\ucc9c\uc740 \uc81c\uacf5\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"list-style-type: none\"><\/li>\n<\/ul>\n<\/li>\n<li>\ucd94\ucc9c \uc0c9\uc778:\n<ul>\n<li>\uc0c9\uc778:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"padding-left: 40px\">\uc774 \uc138\uc158\uc5d0\uc11c\ub294 WHERE\/ON \uc808\uc758 \uc220\uc5b4\ub97c \uae30\ubc18\uc73c\ub85c \ud558\ub294 \uad8c\uc7a5 \uc778\ub371\uc2a4\uc640 \uac01 \uc778\ub371\uc2a4\uac00 \ub530\ub974\ub294 \ud574\ub2f9 \uad8c\uc7a5 \uaddc\uce59\uc744 \ub098\uc5f4\ud569\ub2c8\ub2e4.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>\ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"padding-left: 40px\">\uc774 \uc138\uc158\uc5d0\uc11c\ub294 \uc785\ub825 \ucffc\ub9ac\uc5d0 \uc801\uc6a9\ud560 \uc218 \uc788\ub294 \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\ub97c \ub098\uc5f4\ud569\ub2c8\ub2e4.<\/p>\n<h3>\ubd80\ubd84 \uc0c9\uc778<\/h3>\n<p>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ub370\uc774\ud130 \ubaa8\ub378\uc740 \uc720\uc5f0\ud55c \uc2a4\ud0a4\ub9c8\ub97c \uac16\ucd98 JSON\uc774\uba70, \ud558\ub098\uc758 \ubc84\ud0b7\uc5d0 \uc5ec\ub7ec \uc720\ud615\uc758 \ubb38\uc11c\uac00 \ub4e4\uc5b4 \uc788\ub294 \uc774\uc9c8\uc801\uc778 \ud615\ud0dc\uac00 \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc77c\ubc18\uc801\uc73c\ub85c \ub370\uc774\ud130 \ud56d\ubaa9\uc5d0\ub294 \ubd84\ub958\ub97c \uc704\ud55c '\uc720\ud615' \ud544\ub4dc\uac00 \ud3ec\ud568\ub429\ub2c8\ub2e4. \ucffc\ub9ac\uc5d0 \ud2b9\uc815 \uc720\ud615\uc758 \ubb38\uc11c\uc5d0 \ub300\ud55c \ud544\ud130\uac00 \ud3ec\ud568\ub41c \uacbd\uc6b0, WHERE \uc808\uc5d0 \"type\" \ud544\ub4dc\uac00 \uc788\ub294 \ubd80\ubd84 \uc778\ub371\uc2a4\uac00 \uc81c\uacf5\ub429\ub2c8\ub2e4. \uc774\ub294 \uc778\ub371\uc2a4 \ud06c\uae30\ub97c \ucd5c\uc18c\ud654\ud558\uace0 \uc778\ub371\uc2a4 \uc561\uc138\uc2a4 \uacbd\ub85c\ub97c \ub2e8\ucd95\ud558\uba70 \ucffc\ub9ac\ub97c \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc73c\ub85c \uc2e4\ud589\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc704\uc758 \ucffc\ub9ac \uc608\uc81c\uc5d0\uc11c \uad8c\uc7a5 \uc778\ub371\uc2a4\ub294 WHERE \uc808\uc5d0 \"type = 'route'\"\uac00 \ucd94\uac00\ub41c \ubd80\ubd84 \uc778\ub371\uc2a4\ub85c, \"route\" \uc720\ud615\uc758 \ubb38\uc11c\uc5d0 \ub300\ud574\uc11c\ub9cc \uc778\ub371\uc2a4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4:<\/p>\n<pre class=\"lang:default decode:true\">CREATE INDEX adv_id_type_name ON `travel-sample`(`id`,`name`) WHERE `type` = 'route'<\/pre>\n<p>\ub0b4\ubd80\uc801\uc73c\ub85c \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 INFER \ubb38\uc758 \"flavor\" \ud1b5\uacc4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc220\uc5b4\uc758 \ud544\ub4dc\ub97c \uc77c\uce58\uc2dc\ud0a4\uace0 \uc774\ub97c \ubd80\ubd84 \uc778\ub371\uc2a4 \uc870\uac74\uc5d0 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<p>\ub354 \ub9ce\uc740 \uc544\uc774\ub514\uc5b4\ub97c \uc5bb\uae30 \uc704\ud574, \uac01 \ud0a4 \uacf5\uac04\uc5d0 \ub300\ud574 \uc778\ub371\uc2a4 \uc870\uac74\uc73c\ub85c \"type\" \ud544\ub4dc\uac00 \uc788\ub294 \ubd80\ubd84 \uc778\ub371\uc2a4\uac00 \uad8c\uace0\ub418\ub294 \uc5ec\ub7ec \uc720\ud615\uc758 \ubb38\uc11c\uc5d0 \ub300\ud574 ANSI JOIN\uc73c\ub85c \ucffc\ub9ac\ub97c \uc2e4\ud589\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<p>\ucffc\ub9ac 2:<\/p>\n<pre class=\"lang:default decode:true\">ADVISE SELECT DISTINCT airline.name,\r\n                       airport.name AS airport,\r\n                       route.distance\r\nFROM `travel-sample` airport\r\nINNER JOIN `travel-sample` route ON airport.faa = route.sourceairport\r\n    AND route.type = \"route\"\r\nINNER JOIN `travel-sample` airline ON route.airline = airline.iata\r\n    AND airline.type = \"airline\"\r\nWHERE airport.type = \"airport\"\r\n    AND airport.city = \"San Jose\";<\/pre>\n<pre class=\"lang:default decode:true\">[\r\n    {\r\n        \"#operator\": \"Advise\",\r\n        \"advice\": {\r\n            \"#operator\": \"IndexAdvice\",\r\n            \"adviseinfo\": [\r\n                {\r\n                    \"recommended_indexes\": {\r\n                        \"covering_indexes\": [\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_iata_type_name ON `travel-sample`(`iata`,`name`) WHERE `type` = 'airline'\"\r\n                            },\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_city_type_faa_name ON `travel-sample`(`city`,`faa`,`name`) WHERE `type` = 'airport'\"\r\n                            },\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_sourceairport_type_airline_distance ON `travel-sample`(`sourceairport`,`airline`,`distance`) WHERE `type` = 'route'\"\r\n                            }\r\n                        ],\r\n                        \"indexes\": [\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_city_type ON `travel-sample`(`city`) WHERE `type` = 'airport'\",\r\n                                \"recommending_rule\": \"Index keys follow order of predicate types: 2. equality, 10. flavor for partial index.\"\r\n                            },\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_sourceairport_type ON `travel-sample`(`sourceairport`) WHERE `type` = 'route'\",\r\n                                \"recommending_rule\": \"Index keys follow order of predicate types: 2. equality, 10. flavor for partial index.\"\r\n                            },\r\n                            {\r\n                                \"index_statement\": \"CREATE INDEX adv_iata_type ON `travel-sample`(`iata`) WHERE `type` = 'airline'\",\r\n                                \"recommending_rule\": \"Index keys follow order of predicate types: 2. equality, 10. flavor for partial index.\"\r\n                            }\r\n                        ]\r\n                    }\r\n                }\r\n            ]\r\n        },\r\n        \"query\": \"SELECT DISTINCT airline.name, airport.name AS airport, route.distance FROM `travel-sample` airport INNER JOIN `travel-sample` route ON airport.faa = route.sourceairport AND route.type = \\\"route\\\" INNER JOIN `travel-sample` airline ON route.airline = airline.iata AND airline.type = \\\"airline\\\" WHERE airport.type = \\\"airport\\\" AND airport.city = \\\"San Jose\\\";\"\r\n    }\r\n    ]<\/pre>\n<h3>\ubc30\uc5f4 \uc220\uc5b4\uc5d0 \ub300\ud55c \ubc30\uc5f4 \uc778\ub371\uc2a4<\/h3>\n<p>JSON\uc740 \uc911\ucca9\ub41c \uc2a4\uce7c\ub77c \ud544\ub4dc, \uac1d\uccb4, \ubc30\uc5f4\ub85c \uad6c\uc131\ub41c \uacc4\uce35\uc801 \uad6c\uc870\uc785\ub2c8\ub2e4. \ubc30\uc5f4 \uc778\ub371\uc2a4 \ud0a4\ub294 \uc911\ucca9\ub41c \ubc30\uc5f4 \uae4a\uc219\uc774 \ub4e4\uc5b4\uac00\uc11c \uc778\ub371\uc2f1\ud574\uc57c \ud558\ub294 \uc694\uc18c\ub098 \uac1d\uccb4\uc758 \ud544\ub4dc\ub97c \uba85\ud655\ud558\uac8c \ucc38\uc870\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \ub2e4\uc74c\uc5d0\uc11c \ubc14\uc778\ub529\uacfc \ud45c\ud604\uc2dd\uc744 \uc7ac\uadc0\uc801\uc73c\ub85c \ud0d0\uc0c9\ud558\uc5ec \ubc30\uc5f4 \uc778\ub371\uc2a4\ub97c \ucd94\ucc9c\ud569\ub2c8\ub2e4. <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/collectionops.html#collection-op-any\">ANY<\/a> \ubc94\uc704 \uc220\uc5b4\uc785\ub2c8\ub2e4.<\/p>\n<p>\ucffc\ub9ac 3:<\/p>\n<pre class=\"lang:default decode:true\">ADVISE SELECT id\r\nFROM `travel-sample`\r\nWHERE type = \"route\"\r\n    AND ANY x IN schedule,\r\n             z IN schedule SATISFIES (ANY y IN x.day, w IN z.flight SATISFIES [y, w] &lt;[1, \"AF547\"] END) END;<\/pre>\n<pre class=\"lang:default decode:true\">[\r\n  {\r\n    \"#operator\": \"Advise\",\r\n    \"advice\": {\r\n      \"#operator\": \"IndexAdvice\",\r\n      \"adviseinfo\": [\r\n        {\r\n          \"recommended_indexes\": {\r\n            \"covering_indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_DISTINCT_schedule_schedule_day_flight_type_id ON `travel-sample`(DISTINCT ARRAY (DISTINCT ARRAY [y, w] FOR y in x.day, w in z.flight END) FOR x in schedule, z in schedule END,`id`) WHERE `type` = 'route'\"\r\n              }\r\n            ],\r\n            \"indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_DISTINCT_schedule_schedule_day_flight_type ON `travel-sample`(DISTINCT ARRAY (DISTINCT ARRAY [y, w] FOR y in x.day, w in z.flight END) FOR x in schedule, z in schedule END) WHERE `type` = 'route'\",\r\n                \"recommending_rule\": \"Index keys follow order of predicate types: 6. array predicate, 10. flavor for partial index.\"\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      ]\r\n    },\r\n    \"query\": \"SELECT id FROM `travel-sample` WHERE type = \\\"route\\\" AND ANY x IN schedule, z IN schedule SATISFIES (ANY y IN x.day, w IN z.flight SATISFIES [y, w] &lt;[1, \\\"AF547\\\"] END) END;\"\r\n  }\r\n]<\/pre>\n<p>\uc0ac\uc6a9\uc790\ub294 \ubc30\uc5f4\uc758 \uc624\ube0c\uc81d\ud2b8 \uc694\uc18c\uc640 \ud544\ub4dc\uc5d0 \ucd94\uac00 \ub85c\uc9c1\uacfc \ucc98\ub9ac\ub97c \uc720\uc5f0\ud558\uac8c \uc801\uc6a9\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/collectionops.html#collection-op-any\">ANY<\/a> \uc2dd\uacfc \uac19\uc774 \ubcf5\uc7a1\ud55c \ud568\uc218, \ubc30\uc5f4 \uc2dd, \ubd80\uc6b8 \uc870\uac74 \ub4f1\uc744 \uc9c0\uc6d0\ud558\uae30 \uc704\ud574 \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \uc544\ub798 \ucffc\ub9ac\uc5d0\uc11c\uc640 \uac19\uc774 \ub178\ub825\ud560 \uac83\uc785\ub2c8\ub2e4:<\/p>\n<p>\ucffc\ub9ac 4:<\/p>\n<pre class=\"lang:default decode:true\">ADVISE SELECT *\r\nFROM products AS c\r\nWHERE ANY p IN OBJECT_PAIRS(c.productIds) \r\n            SATISFIES [p.name, ARRAY_COUNT(p.val) &gt; 0, c.metadata.configurations.[p.name].enabled, ARRAY_CONTAINS(IFMISSINGORNULL(c.deletedFor, []),p.name)] = [\\\"US\\\", TRUE, FALSE, FALSE] END<\/pre>\n<pre class=\"lang:default decode:true\">[\r\n  {\r\n    \"#operator\": \"Advise\",\r\n    \"advice\": {\r\n      \"#operator\": \"IndexAdvice\",\r\n      \"adviseinfo\": [\r\n        {\r\n          \"recommended_indexes\": {\r\n            \"indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_DISTINCT_object_pairs_productIds_name_array_count_val_metada4251025607 ON `products`(DISTINCT ARRAY [p.name, 0 &lt; array_count((`p`.`val`)), metadata.configurations.[p.name].enabled, array_contains(ifmissingornull((`deletedFor`), []), (`p`.`name`))] FOR p in object_pairs((`productIds`)) END)\",\r\n                \"recommending_rule\": \"Index keys follow order of predicate types: 6. array predicate.\"\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      ]\r\n    },\r\n    \"query\": \"SELECT * FROM products AS c WHERE ANY p IN OBJECT_PAIRS(c.productIds) SATISFIES [p.name, ARRAY_COUNT(p.val) &gt; 0, c.metadata.configurations.[p.name].enabled, ARRAY_CONTAINS(IFMISSINGORNULL(c.deletedFor, []),p.name)] = [\\\"US\\\", TRUE, FALSE, FALSE] END;\"\r\n  }\r\n]<\/pre>\n<h3>UNNEST \uc5f0\uc0b0\uc744 \uc704\ud55c \ubc30\uc5f4 \uc778\ub371\uc2a4<\/h3>\n<p>UNNEST\ub294 \uc911\ucca9\ub41c \ubc30\uc5f4\uacfc \uc0c1\uc704 \uac1d\uccb4\uc758 \uc870\uc778 \uc5f0\uc0b0\uc744 \uc218\ud589\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc774 \uc791\uc5c5\uc758 \uc220\uc5b4\uac00 \uc911\ucca9 \ubc30\uc5f4\uc758 \uac1c\ubcc4 \uc694\uc18c\uc5d0 \uc801\uc6a9\ub418\ub294 \uacbd\uc6b0 \ubc30\uc5f4 \uc778\ub371\uc2a4\ub294 \ucffc\ub9ac \uc2e4\ud589\uc744 \ucd5c\uc801\ud654\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub429\ub2c8\ub2e4.<\/p>\n<p>N1QL \ucffc\ub9ac \uc635\ud2f0\ub9c8\uc774\uc800\ub294 \uc778\ub371\uc2a4 \uc815\uc758\uc5d0 \ubaa8\ub4e0 \ubc30\uc5f4 \uc694\uc18c\uac00 \uc0c9\uc778\ub41c \uc801\uc808\ud55c \uc120\ud589 \ubc30\uc5f4 \ud0a4\uac00 \uc788\ub294 \uacbd\uc6b0 \uc911\ucca9 \ud574\uc81c \uc2a4\uce94\uacfc \uc911\ucca9 \ud574\uc81c \ucee4\ubc84\ub9c1 \uc2a4\uce94\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \uc774 \uaddc\uce59\uc5d0 \ub530\ub77c \uc911\ucca9 \ud574\uc81c \uc2dd\uc744 \uc218\uc9d1\ud558\uace0 \ucd94\ucc9c\uc744 \uc704\ud574 \ubc30\uc5f4 \uc778\ub371\uc2a4\ub97c \uc5ed\uc73c\ub85c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc544\ub798 \uc608\uc2dc\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<p>\ucffc\ub9ac 5:<\/p>\n<pre class=\"lang:default decode:true\">ADVISE SELECT COUNT(*)\r\nFROM `travel-sample` t\r\nUNNEST schedule AS x\r\nUNNEST x.special_flights AS y\r\nWHERE y.flight IS NOT NULL\r\n    AND t.type = \"route\"<\/pre>\n<pre class=\"lang:default decode:true\">[\r\n  {\r\n    \"#operator\": \"Advise\",\r\n    \"advice\": {\r\n      \"#operator\": \"IndexAdvice\",\r\n      \"adviseinfo\": [\r\n        {\r\n          \"recommended_indexes\": {\r\n            \"covering_indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_ALL_schedule_special_flights_flight_type ON `travel-sample`(ALL ARRAY (ALL ARRAY y.flight FOR y IN x.special_flights END) FOR x IN schedule END,`type`)\"\r\n              }\r\n            ],\r\n            \"indexes\": [\r\n              {\r\n                \"index_statement\": \"CREATE INDEX adv_ALL_schedule_special_flights_flight_type ON `travel-sample`(ALL ARRAY (ALL ARRAY y.flight FOR y IN x.special_flights END) FOR x IN schedule END,`type`)\",\r\n                \"recommending_rule\": \"Index keys follow order of predicate types: 1. leading array index for unnest, 2. equality.\"\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      ]\r\n    },\r\n    \"query\": \"SELECT COUNT(*)\\nFROM `travel-sample` t\\nUNNEST schedule AS x\\nUNNEST x.special_flights AS y\\nWHERE y.flight IS NOT NULL\\n    AND t.type = \\\"route\\\"\"\r\n  }\r\n]<\/pre>\n<h3>\ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4<\/h3>\n<p>\ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\ub294 \ud2b9\uc815 \ucffc\ub9ac\uc5d0 \ud544\uc694\ud55c \ubaa8\ub4e0 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud558\uace0 \ub370\uc774\ud130 \uc11c\ube44\uc2a4\uc5d0\uc11c \ubb38\uc11c\ub97c \uac00\uc838\uc62c \ub54c \ubc1c\uc0dd\ud558\ub294 \uc624\ubc84\ud5e4\ub4dc\ub97c \ud53c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \ub2e4\uc74c \ub2e8\uacc4\uc5d0\uc11c \ud574\ub2f9\ub418\ub294 \uacbd\uc6b0 \uc785\ub825 \ucffc\ub9ac\uc5d0 \ub300\ud574 \uc774 \ud6a8\uc728\uc801\uc778 \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\ub97c \uc870\uc5b8\ud569\ub2c8\ub2e4:<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>\uba3c\uc800 WHERE\/ON \uc808\uc758 \ubaa8\ub4e0 \uc220\uc5b4\uc5d0\uc11c \uc778\ub371\uc2a4 \ud0a4\ub97c \uc218\uc9d1\ud569\ub2c8\ub2e4.<\/li>\n<li>\uadf8\ub7f0 \ub2e4\uc74c \ub098\uba38\uc9c0 \ud22c\uc601\uacfc GROUP BY\/ORDER BY \ud45c\ud604\uc2dd\uc744 \uc778\ub371\uc2a4 \uc815\uc758\uc5d0 \ucd94\uac00\ud558\uace0 \uc7a0\uc815 \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4 \ud6c4\ubcf4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li>\ub9c8\uc9c0\ub9c9\uc73c\ub85c, \ucffc\ub9ac \ucd5c\uc801\ud654 \ub3c4\uad6c\uc640 \ub3d9\uc77c\ud55c \uc811\uadfc \ubc29\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc778\ub371\uc2a4 \ud45c\ud604\uc2dd\uc774 \ucffc\ub9ac\ub97c \ucc98\ub9ac\ud558\ub294 \ub370 \ud544\uc694\ud55c \ubaa8\ub4e0 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud560 \uc218 \uc788\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\uc774\uc804 \ucffc\ub9ac \uc608\uc81c\uc5d0\uc11c\ub294 \ub2e8\uc77c \ud0a4 \uacf5\uac04 \ucffc\ub9ac, JOIN \uc5f0\uc0b0, ANY \uc2dd \ubc0f UNNEST \uc220\uc5b4\uc5d0 \ub300\ud574 \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\uc640 \ucee4\ubc84\ub9c1 \ubc30\uc5f4 \uc778\ub371\uc2a4\uac00 \uc81c\uacf5\ub41c\ub2e4\ub294 \uac83\uc744 \ubcf4\uc5ec\uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>\uc778\ub371\uc2a4 \uba85\uba85 \uaddc\uce59<\/h3>\n<p><span style=\"font-weight: 400\">\uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\uc5d0\uc11c \uc778\ub371\uc2a4 \uc774\ub984\uc740 \uc138 \uac00\uc9c0 \uc694\uad6c \uc0ac\ud56d\uc744 \ucda9\uc871\ud558\ub3c4\ub85d \uc124\uacc4\ub418\uc5c8\uc2b5\ub2c8\ub2e4:<\/span><\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>\ubaa8\ub4e0 \uc778\ub371\uc2a4 \ud0a4\ub97c \ubc11\uc904\ub85c \uc5f0\uacb0\ud558\uc5ec \uc778\ub371\uc2a4 \uad6c\uc131\uc744 \ubc18\uc601\ud569\ub2c8\ub2e4.<\/li>\n<li>\"adv-\" \uc811\ub450\uc0ac\ub97c \ucd94\uac00\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc815\uc758 \uc778\ub371\uc2a4\uc640 \uad6c\ubd84\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc798\ub77c\ub0b4\uace0 \ud574\uc2dc \ucf54\ub4dc\ub85c \ub300\uccb4\ud558\uc5ec \uc801\ub2f9\ud55c \uae38\uc774\ub85c \uc870\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\uc77c\ubc18 \uc778\ub371\uc2a4 \ubc0f \ubc30\uc5f4 \uc778\ub371\uc2a4\uc758 \ud615\uc2dd\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>ADV_FIELD1_FIELD2_FIELD3...<\/li>\n<li>adv_[DISTINCT\/ALL]_level1_level2_level3...<\/li>\n<\/ul>\n<p>Couchbase \uc778\ub371\uc2f1\uc5d0\uc11c\ub294 \uc911\ubcf5 \uc774\ub984\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc73c\uba70, \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \uad8c\uc7a5 \uc0ac\ud56d\uc5d0\uc11c \uc778\ub371\uc2a4 \uc774\ub984\uc758 \uace0\uc720\uc131\uc744 \ubcf4\uc7a5\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.  \uc774 \uc624\ub958\uac00 \ubc1c\uc0dd\ud558\uba74 \uc778\ub371\uc2a4 \uc774\ub984\uc744 \ubcc0\uacbd\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<h3>\uc694\uc57d<\/h3>\n<p>\uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800(ADVISE \ubb38)\ub294 \ub2e8\uc77c \ucffc\ub9ac\uc5d0 \ub300\ud55c \uc778\ub371\uc2a4 \uad8c\uc7a5 \uc0ac\ud56d\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc77c\ubc18 \uc778\ub371\uc2a4, \ubd80\ubd84 \uc778\ub371\uc2a4, \ubc30\uc5f4 \uc778\ub371\uc2a4, \ucee4\ubc84\ub9c1 \uc778\ub371\uc2a4\ub97c \ucd94\ucc9c\ud558\uace0 \uac01 \uc778\ub371\uc2a4 \ud0a4\uac00 \ub530\ub974\ub294 \ud574\ub2f9 \ucd94\ucc9c \uaddc\uce59\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.  \ub610\ud55c \ud558\ub098\uc758 \ucffc\ub9ac\ubcc4\ub85c \ud604\uc7ac \uc0ac\uc6a9\ub418\ub294 \uc778\ub371\uc2a4\ub97c \ud3c9\uac00\ud558\uc5ec \ubd88\ud544\uc694\ud55c \ucd94\ucc9c\uc744 \ud53c\ud569\ub2c8\ub2e4.<\/p>\n<p>DP \uae30\ub2a5\uc73c\ub85c \ucd9c\uc2dc\ub41c \uc778\ub371\uc2a4 \uc5b4\ub4dc\ubc14\uc774\uc800\ub294 \uc544\uc9c1 \ucd08\uae30 \ub2e8\uacc4\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uace0\uac1d\uc758 \uc694\uad6c \uc0ac\ud56d\uc744 \ub354 \uc798 \ucda9\uc871\ud558\uace0 \ucffc\ub9ac \ucd5c\uc801\ud654\uc5d0 \uae30\uc5ec\ud560 \uc218 \uc788\ub3c4\ub85d \uae30\ub2a5\uacfc \uc0ac\uc6a9\uc131\uc774 \ub354\uc6b1 \uac1c\uc120\ub420 \uc608\uc815\uc785\ub2c8\ub2e4.<\/p>\n<h3><b>\ub9ac\uc18c\uc2a4<\/b><\/h3>\n<ul>\n<li><i>\ub2e4\uc6b4\ub85c\ub4dc<\/i>:\u00a0<a href=\"https:\/\/www.couchbase.com\/blog\/ko\/downloads\/?family=server&amp;product=couchbase-server-developer\">Couchbase Server 6.5 \ub2e4\uc6b4\ub85c\ub4dc<\/a><i><\/i><\/li>\n<li><i>\ubb38\uc11c<\/i>:\u00a0<a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/introduction\/whats-new.html\">\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \uc11c\ubc84 6.5\uc758 \uc0c8\ub85c\uc6b4 \uae30\ub2a5<\/a><i><\/i><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/ko\/tag\/6-5\/\"><b>6.5 \ube14\ub85c\uadf8 \ubaa8\ub450 \ubcf4\uae30<\/b><\/a><\/li>\n<\/ul>\n<p>6.5\uc758 \uae30\ub2a5\uc774 \ub9c8\uc74c\uc5d0 \ub4dc\uc168\ub294\uc9c0, \uc55e\uc73c\ub85c \ube44\uc988\ub2c8\uc2a4\uc5d0 \uc5b4\ub5a4 \ub3c4\uc6c0\uc774 \ub420\uc9c0 \uc5ec\ub7ec\ubd84\uc758 \uc758\uacac\uc744 \ub4e3\uace0 \uc2f6\uc2b5\ub2c8\ub2e4. \ub313\uae00\uc744 \ud1b5\ud574 \uc758\uacac\uc744 \uacf5\uc720\ud574 \uc8fc\uc2dc\uac70\ub098\u00a0<a href=\"https:\/\/www.couchbase.com\/blog\/ko\/forums\/\">\ud3ec\ub7fc<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview Index advisor is introduced in Couchbase server 6.5 as a developer preview feature. It targets at providing secondary index recommendation to help DBAs and developers optimize N1QL query performance. This version is rule-based, in which the index candidates will [&hellip;]<\/p>","protected":false},"author":17714,"featured_media":7449,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1812],"tags":[2378],"ppma_author":[9088],"class_list":["post-7370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-n1ql-query","tag-6-5"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Index Advisor for N1QL Query Statement - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/ko\/index-advisor-for-n1ql-query-statement\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Index Advisor for N1QL Query Statement\" \/>\n<meta property=\"og:description\" content=\"Overview Index advisor is introduced in Couchbase server 6.5 as a developer preview feature. It targets at providing secondary index recommendation to help DBAs and developers optimize N1QL query performance. This version is rule-based, in which the index candidates will [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/ko\/index-advisor-for-n1ql-query-statement\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-09T17:00:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-19T11:44:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2019\/08\/Transactions-alternative-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"553\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Chang Liu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chang Liu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/\"},\"author\":{\"name\":\"Chang Liu\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c43360951567e4b3bef754197f5e866b\"},\"headline\":\"Index Advisor for N1QL Query Statement\",\"datePublished\":\"2019-08-09T17:00:10+00:00\",\"dateModified\":\"2023-05-19T11:44:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/\"},\"wordCount\":1132,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg\",\"keywords\":[\"6.5\"],\"articleSection\":[\"Couchbase Server\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/\",\"name\":\"Index Advisor for N1QL Query Statement - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg\",\"datePublished\":\"2019-08-09T17:00:10+00:00\",\"dateModified\":\"2023-05-19T11:44:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg\",\"width\":1400,\"height\":553},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Index Advisor for N1QL Query Statement\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c43360951567e4b3bef754197f5e866b\",\"name\":\"Chang Liu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/2eede623c7ed061e0426183cb9cac122\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d73d8b19010a13d5e2567a4051ea99cf60a37f9ff39d8197255739d72a030b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d73d8b19010a13d5e2567a4051ea99cf60a37f9ff39d8197255739d72a030b3b?s=96&d=mm&r=g\",\"caption\":\"Chang Liu\"},\"description\":\"Software Engineer in N1QL Query Team\",\"url\":\"https:\/\/www.couchbase.com\/blog\/ko\/author\/chang-liucouchbase-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Index Advisor for N1QL Query Statement - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/ko\/index-advisor-for-n1ql-query-statement\/","og_locale":"ko_KR","og_type":"article","og_title":"Index Advisor for N1QL Query Statement","og_description":"Overview Index advisor is introduced in Couchbase server 6.5 as a developer preview feature. It targets at providing secondary index recommendation to help DBAs and developers optimize N1QL query performance. This version is rule-based, in which the index candidates will [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/ko\/index-advisor-for-n1ql-query-statement\/","og_site_name":"The Couchbase Blog","article_published_time":"2019-08-09T17:00:10+00:00","article_modified_time":"2023-05-19T11:44:06+00:00","og_image":[{"width":1400,"height":553,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2019\/08\/Transactions-alternative-1.jpg","type":"image\/jpeg"}],"author":"Chang Liu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chang Liu","Est. reading time":"8\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/"},"author":{"name":"Chang Liu","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c43360951567e4b3bef754197f5e866b"},"headline":"Index Advisor for N1QL Query Statement","datePublished":"2019-08-09T17:00:10+00:00","dateModified":"2023-05-19T11:44:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/"},"wordCount":1132,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg","keywords":["6.5"],"articleSection":["Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/","url":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/","name":"Index Advisor for N1QL Query Statement - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg","datePublished":"2019-08-09T17:00:10+00:00","dateModified":"2023-05-19T11:44:06+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2019\/08\/Transactions-alternative-1.jpg","width":1400,"height":553},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/index-advisor-for-n1ql-query-statement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Index Advisor for N1QL Query Statement"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","description":"NoSQL \ub370\uc774\ud130\ubca0\uc774\uc2a4, Couchbase","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c43360951567e4b3bef754197f5e866b","name":"\ucc3d \ub9ac\uc6b0","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/2eede623c7ed061e0426183cb9cac122","url":"https:\/\/secure.gravatar.com\/avatar\/d73d8b19010a13d5e2567a4051ea99cf60a37f9ff39d8197255739d72a030b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d73d8b19010a13d5e2567a4051ea99cf60a37f9ff39d8197255739d72a030b3b?s=96&d=mm&r=g","caption":"Chang Liu"},"description":"N1QL \ucffc\ub9ac \ud300\uc758 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5d4\uc9c0\ub2c8\uc5b4","url":"https:\/\/www.couchbase.com\/blog\/ko\/author\/chang-liucouchbase-com\/"}]}},"authors":[{"term_id":9088,"user_id":17714,"is_guest":0,"slug":"chang-liucouchbase-com","display_name":"Chang Liu","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/d73d8b19010a13d5e2567a4051ea99cf60a37f9ff39d8197255739d72a030b3b?s=96&d=mm&r=g","author_category":"","last_name":"Liu","first_name":"Chang","job_title":"","user_url":"","description":"N1QL \ucffc\ub9ac \ud300\uc758 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5d4\uc9c0\ub2c8\uc5b4"}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/7370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/users\/17714"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/comments?post=7370"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/7370\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media\/7449"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media?parent=7370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/categories?post=7370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/tags?post=7370"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/ppma_author?post=7370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}