본문 바로가기

IT

오라클(ORACLE) HINT 모음, 튜닝, sql

반응형

<Optimization Approaches and Goals - Optimization  접근과 목적>                     

/*+ ALL_ROWS */                                                                     

        explicitly chooses the cost-based approach to optimize a statement          

        block with a goal of best throughput (that is, minimum                      

        total resource consumption)                                                 

        가장 좋은 단위 처리량의 목표로 문 블록을 최적화하기 위해 cost-based         

        접근 방법을 선택합니다. (즉, 전체적인 최소의 자원 소비)                     

/*+ CHOOSE */                                                                       

        causes the optimizer to choose between the rule-based                       

        approach and the cost-based approach for a SQL statement                    

        based on the presence of statistics for the tables accessed by              

        the statement                                                               

        최적자(optimizer)가 그 문에 의해 접근된 테이블을 위해 통계의 존재에         

        근거를 두는 SQL 문을 위해 rule-based 접근 방법과 cot-based 접근 방법        

        사이에 선택하게 합니다.                                                     

/*+ FIRST_ROWS */                                                                   

        explicitly chooses the cost-based approach to optimize a statement          

        block with a goal of best response time (minimum                            

        resource usage to return first row)                                         

        가장 좋은 응답 시간의 목표로 문 블록을 최적화하기 위해 cost-based 접근      

        방법을 선택합니다. (첫 번째 행을 되돌려 주는 최소의 자원 사용)              

/*+ RULE */                                                                         

        explicitly chooses rule-based optimization for a statement block            

        rule-based 최적화를 고르는 접근방법을 선택합니다.                           

                                                                                    

<Access Methods - 접근 방법>                                                        

/*+ AND_EQUAL(table index) */                                                       

        explicitly chooses an execution plan that uses an access path               

        that merges the scans on several single-column indexes                      

        그만큼 실행 계획을 선택합니다. 그리고 여럿의 single-column 색인에           

        그 scan을 합병하는 접근 경로를 사용합니다.                                  

/*+ CLUSTER(table) */                                                               

        explicitly chooses a cluster scan to access the specified table             

        선택합니다. 그리고, 클러스터는 그 명시된 테이블을 접근하기 위해 살핍니다.   

/*+ FULL(table) */                                                                  

        explicitly chooses a full table scan for the specified table                

        그 명시된 테이블을 위하여, 전체 테이블 scan을 고르는                        

/*+ HASH(table) */                                                                  

        explicitly chooses a hash scan to access the specified table                

        선택합니다. 그리고, 해쉬는 그 명시된 테이블을 접근하기 위해 운율을          

         살핍니다.                                                                  

/*+ HASH_AJ(table) */                                                               

        transforms a NOT IN subquery into a hash antijoin to access                 

        the specified table                                                         

        변환, 그 명시된 테이블을 접근하는 해쉬 antijoin으로의 NOT IN 부속 조회      

/*+ HASH_SJ (table) */                                                              

        transforms a NOT IN subquery into a hash anti-join to access                

        the specified table                                                         

        변환, 그 명시된 테이블을 접근하는 해쉬 anti-join으로의 NOT IN 부속 조회     

/*+ INDEX(table index) */                                                           

        explicitly chooses an index scan for the specified table                    

        그 명시된 테이블을 위하여, 색인 scan을 고르는                               

/*+ INDEX_ASC(table index) */                                                       

        explicitly chooses an ascending-range index scan for the specified          

        table 그 명시된 테이블을 위하여, ascending-range 색인 scan을 고르는         

/*+ INDEX_COMBINE(table index) */                                                   

        If no indexes are given as arguments for the INDEX_COMBINE                  

        hint, the optimizer uses whatever Boolean combination                       

        of bitmap indexes has the best cost estimate. If particular                 

        indexes are given as arguments, the optimizer tries to use                  

        some Boolean combination of those particular bitmap indexes.                

        어떤 색인도 INDEX_COMBINE 암시를 위해 인수로서 주어지지 않는다면,           

        bitmap 색인의 결합이 어떤 부울의를 가장 좋은 수행 난이도 평가를 가지고      

        있든지 최적자는 이용합니다.                                                 

        특별한 색인이 인수로서 주어진다면, 최적자는 그 특별한 bitmap 색인의         

        몇몇의 부울의 결합을 사용하려고 노력합니다.                                 

/*+ INDEX_DESC(table index) */                                                      

        explicitly chooses a descending-range index scan for the specified          

        table                                                                       

        그 명시된 테이블을 위하여, descending-range 색인 scan을 고르는              

/*+ INDEX_FFS(table index) */                                                       

        causes a fast full index scan to be performed rather than a full            

        table scan                                                                  

        빠른 전체 색인 scan이 전체 테이블 scan이라기보다는 수행되게 합니다.         

/*+ MERGE_AJ (table) */                                                             

        transforms a NOT IN subquery into a merge anti-join to access               

        the specified table                                                         

        변환, NOT IN 부속 조회, 그 명시된 테이블을 접근하기 위해 anti-join을        

        합병합니다.                                                                 

/*+ MERGE_SJ (table) */                                                             

        transforms a correlated EXISTS subquery into a merge semi-join              

        to access the specified table                                               

        변환, 관련된 EXISTS 부속 조회, 접근으로 semi-join을 합병합니다,             

        그 명시된 테이블                                                            

/*+ ROWID(table) */                                                                 

        explicitly chooses a table scan by ROWID for the specified                  

        table                                                                       

        그 명시된 테이블을 위하여, ROWID에 의해 테이블 scan을 고르는                

/*+ USE_CONCAT */                                                                   

        forces combined OR conditions in the WHERE clause of a                      

        query to be transformed into a compound query using the                     

        UNION ALL set operator                                                      

        질의의 WHERE 문절에 있는 UNION ALL 집합 연산자를 사용하는 합성의            

        질의로 변형되는 OR 조건을 합쳤습니다.                                       

                                                                                    

<Join Orders>                                                                       

/*+ LEADING(테이블) */                                                              

      Driving 테이블 결정, 힌트에 명시된 테이블이 먼저 Driving됨                    

/*+ ORDERED */                                                                      

        causes Oracle to join tables in the order in which they appear              

        in the FROM clause                                                          

        오라클이 From 절 순서로 테이블을 결합시키게 합니다.                         

/*+ STAR */                                                                         

        forces the large table to be joined last using a nested-loops join          

        on the index                                                                

        큰 테이블이 최종 사용/회전율에 nested-loops를 결합시킨                      

        그 색인에 결합합니다.                                                       

                                                                                    

                                                                                    

<Join Operations>                                                                   

/*+ DRIVING_SITE (table) */                                                         

        forces query execution to be done at a different site from that             

        selected by Oracle                                                          

        오라클에 의해 선택된 사이트에 되는 실행을 질의합니다.                       

/*+ USE_HASH (table) */                                                             

        causes Oracle to join each specified table with another row                 

        source with a hash join                                                     

        오라클이 테이블이 다른 행 자원으로 해시 접합으로 명시되면서 각자와          

        합치게 합니다.                                                              

/*+ USE_MERGE (table) */                                                            

        causes Oracle to join each specified table with another row                 

        source with a sort-merge join                                               

        오라클이 테이블이 다른 행 자원으로 sort-merge 접합으로 명시되면서 각자와    

        합치게 합니다.                                                              

/*+ USE_NL (table) */                                                               

        causes Oracle to join each specified table to another row                   

        source with a nested-loops join using the specified table as the            

        inner table                                                                 

        오라클이 그 명시된 테이블을 그 안의 테이블로 사용하는 nested-loops 집합과   

        각자와 다른 행 자원에 대한 명시된 테이블을 합치게 합니다.                   

                                                                                    

<Parallel Execution>                                                                

/*+ APPEND */ , /*+ NOAPPEND */                                                     

        specifies that data is simply appended (or not) to a table; existing        

        free space is not used. Use these hints only following the                  

        INSERT keyword.                                                             

        데이터가 테이블로 단순히 덧붙여진다는 (or not)것을 명시합니다;              

        현존하는 영역은 사용되지 않습니다.                                          

        단지 그 삽입 키 핵심어를 따르는 이 암시를 사용하시오.                       

/*+ NOPARALLEL(table) */                                                            

        disables parallel scanning of a table, even if the table was created        

        with a PARALLEL clause                                                      

        그 테이블이 PARALLEL 문절로 새로 만들어졌다면 테이블의 평행의 순차 검색을   

        무능하게 만듭니다.                                                          

/*+ PARALLEL(table, instances) */                                                   

        allows you to specify the desired number of concurrent slave                

        processes that can be used for the operation.                               

        DELETE, INSERT, and UPDATE operations are considered for                    

        parallelization only if the session is in a PARALLEL DML                    

        enabled mode. (Use ALTER SESSION PARALLEL DML to                            

        enter this mode.)                                                           

        당신이 그 연산을 위해 사용될 수 있는 동시의 슬레이브(slave) 프로세스의      

        요구된 수를 명시하는 것을 허락합니다.                                       

        그 세션이 가능하게 된 PARALLEL DML에 모드를 있다면, DELETE, INSERT, UPDATE  

        연산은 단지 parallelization에 대해 고려됩니다. (사용은 이 모드에 들어가기   

        위해 평행의 세션 DML을 변경합니다.)                                         

/*+ PARALLEL_INDEX                                                                  

        allows you to parallelize fast full index scan for partitioned              

        and nonpartitioned indexes that have the PARALLEL attribute                 

        parallelize에 당신에게 빠른 가득한 색인 scan을 허락합니다. 그런데,          

        그것은 PARALLEL 속성을 가지고 있는 색인을 분할했고 nonpartitioned했습니다.  

/*+ NOPARALLEL_INDEX */                                                             

        overrides a PARALLEL attribute setting on an index                          

        병렬이 색인을 나아가는 것을 속하게 하는 대체                                

                                                                                    

<Other Hints>                                                                       

/*+ CACHE */                                                                        

        specifies that the blocks retrieved for the table in the hint are           

        placed at the most recently used end of the LRU list in the                 

        buffer cache when a full table scan is performed                            

        그 블록이 찾아서 가져왔다는 것을 명시합니다. 그리고 그 테이블을 위해        

        그 암시에 놓여집니다. 그런데, 그것은 가장 요즈음 사용된 언제 그 버퍼        

        캐시, 가득한 테이블 scan에 있는 LRU 리스트의 끝입니다. 수행됩니다.          

/*+ NOCACHE */                                                                      

        specifies that the blocks retrieved for this table are placed at            

        the least recently used end of the LRU list in the buffer cache             

        when a full table scan is performed                                         

        그 명시합니다. 그리고, 그 블록은 이 테이블을 위해 검색되면서 요즈음 사용    

        된 언제 그 버퍼 캐시, 가득한 테이블 scan에 있는 LRU 리스트의 가장 작은      

        끝에 놓여집니다. 수행됩니다.                                                

/*+ MERGE (table) */                                                                

        causes Oracle to evaluate complex views or subqueries before                

        the surrounding query                                                       

        오라클이 그 둘러싸는 질의 전에 복잡한 뷰나 부속 조회를 평가하게 합니다.     

/*+ NO_MERGE (table) */                                                             

        causes Oracle not to merge mergeable views                                  

        오라클이 mergeable 뷰를 합병하지 않게 하지 않습니다                         

/*+ PUSH_JOIN_PRED (table) */                                                       

        causes the optimizer to evaluate, on a cost basis, whether or               

        not to push individual join predicates into the view                        

        개개 접합을 미는 것이 그 뷰 안으로 단정 하든 간에 비용 방식으로 최적자가    

        평가하게 합니다.                                                            

/*+ NO_PUSH_JOIN_PRED (table) */                                                    

        Prevents pushing of a join predicate into the view                          

        접합 술부 중에서 그 뷰로 밀면서, 막는                                       

/*+ PUSH_SUBQ */                                                                    

        causes nonmerged subqueries to be evaluated at the earliest                 

        possible place in the execution plan                                        

        원인은 그 실행 계획에서의 가장 이른 가능한 장소에 평가되는 부속 조회를      

        nonmerged 했습니다.                                                         

/*+ STAR_TRANSFORMATION */                                                          

        makes the optimizer use the best plan in which the transformation           

        has been used.                                                              

        최적자가 그 변형이 사용된 가장 좋은 계획을 사용하는 제작    

 

 

 

/*+ ALL_ROWS */

explicitly chooses the cost-based approach to optimize a statement block with a goal of best throughput (that is, minimum total resource consumption)가장좋은 단위 처리량의 목표로 문 블록을 최적화하기 위해 cost-based 접근 방법을 선택합니다. (즉, 전체적인 최소의 자원 소비)

/*+ CHOOSE */

causes the optimizer to choose between the rule-based approach and the cost-based approach for a SQL statement based on the presence of statistics for the tables accessed by the statement 최적자(optimizer)가 그 문에 의해 접근된 테이블을 위해 통계의 존재에 근거를 두는 SQL 문을 위해 rule-based 접근 방법과 cot-based 접근 방법 사이에 선택하게 합니다.

/*+ FIRST_ROWS */

explicitly chooses the cost-based approach to optimize a statement block with a goal of best response time (minimum

resource usage to return first row) 가장 좋은 응답 시간의 목표로 문 블록을 최적화하기 위해 cost-based 접근 방법을 선택합니다. (첫번째 행을 되돌려 주는 최소의 자원 사용)

/*+ RULE */

explicitly chooses rule-based optimization for a statement block 문 블록을 위하여, rule-based 최적화를 고르는Access Methods - 접근 방법

/*+ AND_EQUAL(table index) */

explicitly chooses an execution plan that uses an access path that merges the scans on several single-column indexes

그만큼 실행 계획을 선택합니다. 그리고 여럿의 single-column 색인에 그 scan을 합병하는 접근 경로를 사용합니다.

/*+ CLUSTER(table) */

explicitly chooses a cluster scan to access the specified table 선택합니다. 그리고, 클러스터는 그 명시된 테이블을 접근하기 위해 살핍니다.

/*+ FULL(table) */

explicitly chooses a full table scan for the specified table 그 명시된 테이블을 위하여, 전체 테이블 scan을 고르는

/*+ HASH(table) */

explicitly chooses a hash scan to access the specified table 선택합니다. 그리고, 해쉬는 그 명시된 테이블을 접근하기 위해 운율을 살핍니다.

/*+ HASH_AJ(table) */

transforms a NOT IN subquery into a hash antijoin to access the specified table 변환, 테이블 접근하는 해쉬 antijoin으로의 NOT IN 부속 조회

/*+ HASH_SJ (table) */

transforms a NOT IN subquery into a hash anti-join to access the specified table 변환, 그 명시된 테이블을 접근하는 해쉬 anti-join으로의 NOT IN 부속 조회

/*+ INDEX(table index) */

explicitly chooses an index scan for the specified table 그 명시된 테이블을 위하여, 색인 scan을 고르는

/*+ INDEX_ASC(table index) */

explicitly chooses an ascending-range index scan for the specified table 그 명시된 테이블을 위하여, ascending-range 색인 scan을 고르는

/*+ INDEX_COMBINE(table index) */

If no indexes are given as arguments for the INDEX_COMBINE hint, the optimizer uses whatever Boolean combination of bitmap indexes has the best cost estimate. If particular indexes are given as arguments, the optimizer tries to use some Boolean combination of those particular bitmap indexes. 어떤 색인도 INDEX_COMBINE 암시를 위해 인수로서 주어지지 않는다면, bitmap 색인의 결합이 어떤 부울의를 가장 좋은 수행 난이도 평가를 가지고 있든지 최적자는 이용합니다. 특별한 색인이 인수로서 주어진다면, 최적자는 그 특별한 bitmap 색인의 몇몇의 부울의 결합을 사용하려고 노력합니다.

/*+ INDEX_DESC(table index) */

explicitly chooses a descending-range index scan for the specified table 그 명시된 테이블을 위하여, descending-range 색인 scan을 고르는

/*+ INDEX_FFS(table index) */

causes a fast full index scan to be performed rather than a full table scan 빠른 전체 색인 scan이 전체 테이블 scan이라기보다는 수행되게 합

/*+ MERGE_AJ (table) */

transforms a NOT IN subquery into a merge anti-join to access the specified table

변환, NOT IN 부속 조회, 그 명시된 테이블을 접근하기 위해 anti-join을 합병합니다.

/*+ MERGE_SJ (table) */

transforms a correlated EXISTS subquery into a merge semi-join to access the specified table 변환, 관련된 EXISTS 부속 조회, 접근으로 semi-join을 합병합니다 그 명시된 테이블

/*+ ROWID(table) */

explicitly chooses a table scan by ROWID for the specified table 그 명시된 테이블을 위하여, ROWID에 의해 테이블 scan을 고르는

/*+ USE_CONCAT */

forces combined OR conditions in the WHERE clause of a query to be transformed into a compound query using the UNION ALL set operator

힘은 질의의 WHERE 문절에 있는 UNION ALL 집합 연산자를 사용하는 합성의 질의로 변형되는 OR 조건을 합쳤습니다.

 

/*+ ORDERED */

causes Oracle to join tables in the order in which they appear in the FROM clause 오라클이 어느 것에 순서로 테이블을 결합시키게 합니다.

 

 

 

 

/*+ STAR */

forces the large table to be joined last using a nested-loops join on the index

큰 있는 테이블이 최종 사용/회전율에 nested-loops를 결합시킨 힘은 그 색인에 결합합니다.

 

/*+ DRIVING_SITE (table) */

forces query execution to be done at a different site from that selected by Oracle

힘은 그것과 다른 오라클에 의해 선택된 사이트에 되는 실행을 질의합니다.

/*+ USE_HASH (table) */

causes Oracle to join each specified table with another row source with a hash join

오라클이 테이블이 다른 행 자원으로 해쉬 접합으로 명시되면서 각자와 합치게 합니다.

/*+ USE_MERGE (table) */

causes Oracle to join each specified table with another row source with a sort-merge join

오라클이 테이블이 다른 행 자원으로 sort-merge 접합으로 명시되면서 각자와 합치게 합니다.

/*+ USE_NL (table) */

causes Oracle to join each specified table to another row source with a nested-loops join using the specified table as the inner table

오라클이 그 명시된 테이블을 그 안의 테이블로 사용하는 nested-loops 접합과 각자와 다른 행 자원에 대한 명시된 테이블을 합치게 합니다.

 

/*+ APPEND */ , /*+ NOAPPEND */

specifies that data is simply appended (or not) to a table; existing free space is not used. Use these hints only following the

INSERT keyword.데이타가 테이블로 단순히 덧붙여진다는 (or not)것 명시합니다; 무료인 현존하는 영역은 사용되지 않습니다. 단지 그 삽입 키 핵심어를 따르는 이 암시를 사용하시오.

/*+ NOPARALLEL(table) */

disables parallel scanning of a table, even if the table was created with a PARALLEL clause

그 테이블이 PARALLEL 문절로 새로 만들어졌다면 테이블의 평행의 순차 검색을 무능하게 만듭니다.

/*+ PARALLEL(table, instances) */

allows you to specify the desired number of concurrent slave processes that can be used for the operation. DELETE, INSERT, and UPDATE operations are considered for parallelization only if the session is in a PARALLEL DML enabled mode. (Use ALTER SESSION PARALLEL DML to

enter this mode.) 당신이 그 연산을 위해 사용될 수 있는 동시의 슬레이브(slave) 프로세스의 요구된 수를 명시하는 것을 허락합니다. 그 세션이 가능하게 된 PARALLEL DML에 모드를 있다면, DELETE, INSERT, UPDATE 연산은 단지 parallelization에 대해 고려됩니다. (사용은 이 모드에 들어가기 위해 평행의 세션 DML을 변경합니다.)

/*+ PARALLEL_INDEX */

allows you to parallelize fast full index scan for partitioned and nonpartitioned indexes that have the PARALLEL attribute parallelize에 당신에게 빠른 가득한 색인 scan을 허락합니다. 그런데,그것은 PARALLEL 속성을 가지고 있는 색인을 분할했고 nonpartitioned했습니다.

/*+ NOPARALLEL_INDEX */

overrides a PARALLEL attribute setting on an index 병렬이 색인을 나아가는 것을 속하게 하는 대체

/*+ CACHE */

specifies that the blocks retrieved for the table in the hint are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is performed 그 블록이 찾아서 가져왔다는 것을 명시합니다. 그리고 그 테이블을 위해 그 암시에 놓여집니다. 그런데, 그것은 가장 요즈음 사용된 언제 그 버퍼 캐쉬, 가득한 테이블 scan에 있는 LRU 리스트의 끝입니다. 수행됩니다.

/*+ NOCACHE */

specifies that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed 그 명시합니다. 그리고, 그 블록은 이 테이블을 위해 검색되면서 요즈음 사용된 언제 그 버퍼 캐쉬, 가득한 테이블 scan에 있는 LRU 리스트의 가장 작은 끝에 놓여집니다. 수행됩니다.

/*+ MERGE (table) */

causes Oracle to evaluate complex views or subqueries before the surrounding query 오라클이 그 둘러싸는 질의 전에 복잡한 뷰나 부속 조회를 평가하게 합니다.

/*+ NO_MERGE (table) */

causes Oracle not to merge mergeable views 오라클이 mergeable 뷰를 합병하지 않게 하지 않습니다

/*+ PUSH_JOIN_PRED (table) */

causes the optimizer to evaluate, on a cost basis, whether or not to push individual join predicates into the view개개 접합을 미는 것이 그 뷰 안으로 단정 하든 간에 비용 방식으로 최적자가 평가하게 합니다.

/*+ NO_PUSH_JOIN_PRED (table) */

Prevents pushing of a join predicate into the view 접합 술부 중에서 그 뷰로 밀면서, 막는

/*+ PUSH_SUBQ */

causes nonmerged subqueries to be evaluated at the earliest possible place in the execution plan 원인은 그 실행 계획에서의 가장 이른 가능한 장소에 평가되는 부속 조회를 nonmerged했습니다.

/*+ STAR_TRANSFORMATION */

makes the optimizer use the best plan in which the transformation has been used. 최적자가 그 변형이 사용된 가장 좋은 계획을 사용하는 제작

 




  * 이 포스트는 blogkorea [블코채널 : 정말로 아무 이야기나 올리는 채널] 에 링크 되어있습니다.

반응형