{"id":3757,"date":"2018-04-10T13:36:45","date_gmt":"2018-04-10T04:36:45","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=3757"},"modified":"2018-04-10T13:36:45","modified_gmt":"2018-04-10T04:36:45","slug":"invisible-index-2","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=3757","title":{"rendered":"Invisible Index"},"content":{"rendered":"<ol>\n<li>\n<div style=\"text-align: justify;\">\n<h1><span style=\"font-family: 'arial black', sans-serif;\">Invisible Index<\/span><\/h1>\n<\/div>\n<\/li>\n<\/ol>\n<ul style=\"margin-left: 45pt;\">\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Invisible Index\ub294 11g\uc5d0\uc11c \uc0c8\ub85c \ub098\uc628 \uac83\uc73c\ub85c Virtual Index\uc640\ub294 \ub2ec\ub9ac Optimizer\uc5d0\uac8c \ubcf4\uc774\uc9c0 \uc54a\uc744 \ubfd0 \uc2e4\uc81c\ub85c \uc138\uadf8\uba3c\ud2b8<br \/>\n\ud615\ud0dc\ub85c \uc874\uc7ac\ud558\ub294 \uc778\ub371\uc2a4\uc785\ub2c8\ub2e4.<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Invisible Index\ub294 \uc2e4\uc81c\ub85c \uc874\uc7ac\ud558\ub294 \uc778\ub371\uc2a4\u00a0 \uc774\uace0\u00a0\ub530\ub77c\uc11c\u00a0\ud1b5\uacc4\u00a0\uc815\ubcf4\uac00\u00a0\uc218\uc9d1\ub41c\ub2e4. \ub530\ub77c\uc11c \ubcf4\ub2e4 \uc815\ud655\ud55c \ud14c\uc2a4\ud2b8\ub97c \uc218\ud589\ud560\u00a0\uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<\/span><\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">\ud14c\uc2a4\ud2b8 \ud6c4 \ubc18\uc601\uc5ec\ubd80\uac00 \uacb0\uc815\ub418\uba74 \uc190\uc27d\uac8c Visible Index\ub85c \uc804\ud658\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<\/span><\/div>\n<p style=\"text-align: justify; margin-left: 1pt;\"><span style=\"font-family: 'arial black', sans-serif;\">\u00a0<\/span><\/p>\n<\/li>\n<\/ul>\n<ol>\n<li>\n<div style=\"text-align: justify;\">\n<h1><span style=\"font-family: 'arial black', sans-serif;\">Invisible Index Test<\/span><\/h1>\n<\/div>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Test \ud658\uacbd \uad6c\uc131<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 631px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 219px;\">\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\" valign=\"middle\"><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Tablespace \uc0dd\uc131 \ubc0f User \uc0dd\uc131<br \/>\n<\/strong><\/span><\/p>\n<p style=\"margin-left: 38pt;\"><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; CREATE TABLESPACE TEST DATAFILE &#8216;\/oracle11\/app\/oracle\/oradata\/ORA11\/test01.dbf&#8217; SIZE 10M;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; CREATE USER TEST IDENTIFIED BY TEST DEFAULT TABLESPACE TEST;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; GRANT CONNECT, RESOURCE TO TEST;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Test Table \uc0dd\uc131 \ubc0f \ud1b5\uacc4\uc815\ubcf4 \uc218\uc9d1<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; CREATE TABLE Invisible_index (id NUMBER);<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; BEGIN<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">FOR i IN 1 .. 10000 LOOP<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">INSERT INTO invisible_index VALUES (i);<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">END LOOP;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">COMMIT;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">END;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">\/<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, &#8216;Invisible_index&#8217;, CASCADE=&gt;TRUE);\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Test Table \uc758 PLAN \uc815\ubcf4 \ud655\uc778<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 631px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\">\n<p style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\"><strong>\u2022 PLAN \ud655\uc778<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET SERVEROUTPUT ON;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET AUTOTRACE TRACEONLY EXP;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SELECT * FROM Invisible_index WHERE id = 9999;<img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn1.png?w=640\" alt=\"\" align=\"left\" data-recalc-dims=\"1\" \/><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn2.png?w=640\" alt=\"\" align=\"left\" data-recalc-dims=\"1\" \/><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn3.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">\uceec\ub7fc\uc5d0 Invisible Index \ucd94\uac00\u00a0\ud6c4 PLAN \ud655\uc778<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 630px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 470px;\">\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\">\n<p style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\"><strong>\u2022 ID\uc5d0 Invisible Index \ucd94\uac00<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; CREATE INDEX invisible_id ON invisible_index(id) INVISIBLE;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\"><strong>\u2022 PLAN \ud655\uc778<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET SERVEROUTPUT ON;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET AUTOTRACE TRACEONLY EXP;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SELECT * FROM Invisible_index WHERE id = 9999;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn4.png?w=640\" alt=\"\" align=\"left\" data-recalc-dims=\"1\" \/><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn5.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><span style=\"font-size: 10pt;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">\u00e8 Invisible \uc0c1\ud0dc\uc774\uae30 \ub54c\ubb38\uc5d0 \uc635\ud2f0\ub9c8\uc774\uc800\uac00 Index\ub97c \ubcfc \uc218\uac00 \uc5c6\uc5b4\uc11c Full Table Scan\uc744 \ud568.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Invisible Index \uc0ac\uc6a9 \ud558\uae30 \uc704\ud574\uc11c Parameter \uc124\uc815 \ud6c4 PLAN\ud655\uc778<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 630px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 471px;\">\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\"><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Invisible Index\ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d Parameter \uc124\uc815<br \/>\n<\/strong><\/span><\/p>\n<p style=\"margin-left: 5pt;\"><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; ALTER SESSION SET OPTIMIZER_USE_INVISIBLE_INDEXES=TRUE;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Parameter \uc124\uc815 \ud6c4 PLAN\ud655\uc778<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET SERVEROUTPUT ON;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET AUTOTRACE TRACEONLY EXP;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SELECT * FROM Invisible_index WHERE id = 9999;<\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn6.png?w=640\" alt=\"\" align=\"left\" data-recalc-dims=\"1\" \/><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn7.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><span style=\"font-size: 10pt;\"><br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">\u00e8 Parameter \uc124\uc815 \ud6c4 PLAN\uc744 \ud655\uc778\ud574 \ubcf4\uba74 Index range scan\uc744 \ud55c \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc74c.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Index \ud655\uc778<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 631px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 273px;\">\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\">\n<p style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\"><strong>\u2022 user_indexes View \uc870\ud68c<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SET AUTOTRACE OFF;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SELECT index_name, visibility FROM user_indexes;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn8.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u00e8<br \/>\n<\/strong>Virtual Index\uc640\ub294 \ub2ec\ub9ac Invisible Index\ub294 \uc2e4\uc81c Segment\uac00 \ud560\ub2f9\uc774 \ub418\uae30 \ub54c\ubb38\uc5d0 user_indexes View\uc5d0\uc11c \ud655\uc778\uc774 \uac00\ub2a5\ud558\uace0 Invisible \uc0c1\ud0dc\uc778\uc9c0 visible \uc0c1\ud0dc\uc778\uc9c0 \ud655\uc778\ub3c4 \uac00\ub2a5\ud558\ub2e4.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<div style=\"text-align: justify;\"><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">Invisible Index\ub97c visible \uc0c1\ud0dc\ub85c \ubcc0\uacbd<br \/>\n<\/span><\/div>\n<\/li>\n<\/ul>\n<div style=\"margin-left: 19pt;\">\n<table style=\"border-collapse: collapse; background: #d9d9d9;\" border=\"0\">\n<colgroup>\n<col style=\"width: 630px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 297px;\">\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\"><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Invisible Index\ub97c Optimizer\uac00 \ubcfc \uc218 \uc788\ub3c4\ub85d visible \uc0c1\ud0dc\ub85c \ubcc0\uacbd<br \/>\n<\/strong><\/span><\/p>\n<p style=\"margin-left: 5pt;\"><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; ALTER INDEX Invisible_index visible;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn9.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><strong>\u2022 Index \uc0c1\ud0dc \ud655\uc778<br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\">SQL&gt; SELECT index_name, visibility FROM user_indexes;<\/span><\/p>\n<p><span style=\"font-family: 'arial black', sans-serif;\"><img src=\"https:\/\/i0.wp.com\/oracledba.zapto.org\/wordpress\/wp-content\/uploads\/2018\/04\/041018_0433_InvisibleIn11.png?w=640\" alt=\"\" data-recalc-dims=\"1\" \/><span style=\"font-size: 10pt;\"><br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'arial black', sans-serif;\">\u00e8 Index\uc758 \uc0c1\ud0dc\uac00 VISIBLE\uc778 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc74c.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"text-align: justify; margin-left: 47pt;\">\n","protected":false},"excerpt":{"rendered":"<p>Invisible Index Invisible Index\ub294 11g\uc5d0\uc11c \uc0c8\ub85c \ub098\uc628 \uac83\uc73c\ub85c Virtual Index\uc640\ub294 \ub2ec\ub9ac Optimizer\uc5d0\uac8c \ubcf4\uc774\uc9c0 \uc54a\uc744 \ubfd0 \uc2e4\uc81c\ub85c \uc138\uadf8\uba3c\ud2b8 \ud615\ud0dc\ub85c \uc874\uc7ac\ud558\ub294 \uc778\ub371\uc2a4\uc785\ub2c8\ub2e4. Invisible Index\ub294 \uc2e4\uc81c\ub85c \uc874\uc7ac\ud558\ub294 \uc778\ub371\uc2a4\u00a0 \uc774\uace0\u00a0\ub530\ub77c\uc11c\u00a0\ud1b5\uacc4\u00a0\uc815\ubcf4\uac00\u00a0\uc218\uc9d1\ub41c\ub2e4. \ub530\ub77c\uc11c \ubcf4\ub2e4 \uc815\ud655\ud55c \ud14c\uc2a4\ud2b8\ub97c \uc218\ud589\ud560\u00a0\uc218 \uc788\uc2b5\ub2c8\ub2e4. \ud14c\uc2a4\ud2b8 \ud6c4 \ubc18\uc601\uc5ec\ubd80\uac00 \uacb0\uc815\ub418\uba74 \uc190\uc27d\uac8c Visible Index\ub85c \uc804\ud658\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \u00a0 Invisible Index Test Test \ud658\uacbd \uad6c\uc131 \u2022 Tablespace \uc0dd\uc131 \ubc0f User \uc0dd\uc131 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3627,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[11],"tags":[673,860],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/haisins.synology.me\/wordpress\/wp-content\/uploads\/2018\/03\/sql1.jpg?fit=489%2C345","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3757"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3757"}],"version-history":[{"count":2,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3757\/revisions"}],"predecessor-version":[{"id":3759,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3757\/revisions\/3759"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/3627"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3757"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}