How To Use Hints in Oracle SQL For Performance
How To Use Hints in Oracle SQL For Performance
crit par Abiven jc Jeudi, 05 Mars 2009 14:17 - Mis jour Samedi, 26 Septembre 2009 13:13
The ALL_ROWS hint explicitly chooses the cost-based approach to optimize a s The FIRST_ROWS hint explicitly chooses the cost-based approach to optimize a The CHOOSE hint causes the optimizer to choose between the rule-based appr The RULE hint explicitly chooses rule-based optimization for a statement block.
The FULL hint explicitly chooses a full table scan for the specified table. The syn The ROWID hint explicitly chooses a table scan by ROWID for the specified tabl The CLUSTER hint explicitly chooses a cluster scan to access the specified tabl The HASH hint explicitly chooses a hash scan to access the specified table. The The HASH_AJ hint transforms a NOT IN subquery into a hash anti-join to acces The INDEX hint explicitly chooses an index scan for the specified table. The syn The NO_INDEX hint explicitly disallows a set of indexes for the specified table. T The INDEX_ASC hint explicitly chooses an index scan for the specified table. If If no indexes are given as arguments for the INDEX_COMBINE hint, the optimiz Explicitly instructs the optimizer to use an index join as an access path. For the h The INDEX_DESC hint explicitly chooses an index scan for the specified table. I This hint causes a fast full index scan to be performed rather than a full table. Do not use fast full index scan (from Oracle 10g) Exclude range scan from query plan (from Oracle 10g) Exclude range scan from query plan (from Oracle 10g) Exclude range scan from query plan (from Oracle 10g) The NO_INDEX_SS hint causes the optimizer to exclude a skip scan of the spec
NO_QUERY_TRANSFORMATION optimizer performing query transformations. (from Oracle 10g) Prevents the USE_CONCAT The USE_CONCAT hint forces combined OR conditions in the WHERE clause o
1/3
NO_EXPAND The NO_EXPAND hint prevents the optimizer from considering OR-expansion fo REWRITE The REWRITE hint forces the optimizer to rewrite a query in terms of materialize NOREWRITE / NO_REWRITE 10g renamed to NO_REWRITE. The NOREWRITE/NO_REWRITE hin In Oracle MERGE The MERGE hint lets you merge views in a query. NO_MERGE The NO_MERGE hint causes Oracle not to merge mergeable views. This hint is FACT The FACT hint indicated that the table should be considered as a fact table. This NO_FACT The NO_FACT hint is used in the context of the star transformation to indicate to STAR_TRANSFORMATIONSTAR_TRANSFORMATION hint makes the optimizer use the best plan in w The NO_STAR_TRANSFORMATION star transformation (from Oracle 10g) Do not use UNNEST The UNNEST hint specifies subquery unnesting. NO_UNNEST Use of the NO_UNNEST hint turns off unnesting for specific subquery blocks.
Give this hint to indicate the leading table in a join. This will indicate only 1 table. The ORDERED hint causes Oracle to join tables in the order in which they appe
USE_NL The USE_NL hint causes Oracle to join each specified table to another row sour NO_USE_NL Do not use nested loop (from Oracle 10g) USE_NL_WITH_INDEXSpecifies a nested loops join. (from Oracle 10g) USE_MERGE The USE_MERGE hint causes Oracle to join each specified table with another r NO_USE_MERGE Do not use merge (from Oracle 10g) USE_HASH The USE_HASH hint causes Oracle to join each specified table with another row NO_USE_HASH Do not use hash (from Oracle 10g) Hints for Parallel Execution PARALLEL The PARALLEL hint allows you to specify the desired number of concurrent que NOPARALLEL / NO_PARALLEL The NOPARALLEL hint allows you to disable parallel scanning of a table, even i PQ_DISTRIBUTE The PQ_DISTRIBUTE hint improves the performance of parallel join operations. NO_PARALLEL_INDEXThe NO_PARALLEL_INDEX hint overrides a PARALLEL attribute setting on an Additional Hints APPEND When the APPEND hint is used with the INSERT statement, data is appended to NOAPPEND Overrides the append mode. CACHE The CACHE hint specifies that the blocks retrieved for the table in the hint are pl NOCACHE The NOCACHE hint specifies that the blocks retrieved for this table are placed a PUSH_PRED The PUSH_PRED hint forces pushing of a join predicate into the view. NO_PUSH_PRED The NO_PUSH_PRED hint prevents pushing of a join predicate into the view. PUSH_SUBQ The PUSH_SUBQ hint causes nonmerged subqueries to be evaluated at the ea NO_PUSH_SUBQ The NO_PUSH_SUBQ hint causes non-merged subqueries to be evaluated as t QB_NAME Specifies a name for a query block. (from Oracle 10g) CURSOR_SHARING_EXACT can replace literals in SQL statements with bind variables, if it is safe to d Oracle DRIVING_SITE The DRIVING_SITE hint forces query execution to be done for the table at a diff DYNAMIC_SAMPLING The DYNAMIC_SAMPLING hint lets you control dynamic sampling to improve s SPREAD_MIN_ANALYSIS hint omits some of the compile time optimizations of the rules, mainly detail This Hints with unknown status MERGE_AJ The MERGE_AJ hint transforms a NOT IN subquery into a merge anti-join to ac AND_EQUAL The AND_EQUAL hint explicitly chooses an execution plan that uses an access
2/3
STAR The STAR hint forces the large table to be joined last using a nested loops join o BITMAP Usage: BITMAP(table_name index_name) Uses a bitmap index to access the ta HASH_SJ Use a Hash Anti-Join to evaluate a NOT IN sub-query. Use this hint in the sub-query, not in the main que NL_SJ Use a Nested Loop in a sub-query. (depricated in Oracle 10g) NL_AJ Use an anti-join in a sub-query. (depricated in Oracle 10g) ORDERED_PREDICATES (depricated in Oracle 10g) EXPAND_GSET_TO_UNION (depricated in Oracle 10g)
3/3