Les13 RW
Les13 RW
Les13 RW
Optimizer hints:
• Are used to alter execution plans
• Influence optimizer decisions
• Provide a mechanism to instruct the optimizer to
choose a certain query execution plan
MERGE
SELECT
INSERT /*+ hint */
UPDATE comment
text
DELETE
MERGE
SELECT
INSERT --+ hint
UPDATE comment
text
DELETE
SELECT --+INDEX_COMBINE(CUSTOMERS)
cust_last_name
FROM SH.CUSTOMERS
WHERE ( CUST_GENDER= 'F' AND
CUST_MARITAL_STATUS = 'single')
OR CUST_YEAR_OF_BIRTH BETWEEN '1917'
AND '1920';
Execution Plan
---------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=491
Card=10481
Bytes =167696)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'CUSTOMERS'
(Cost=491 …)
2 1 BITMAP CONVERSION (TO ROWIDS)
3 2 BITMAP OR
4 3 BITMAP AND
5 4 BITMAP INDEX (SINGLE VALUE) OF
'CUST_MARITAL_BIX'
6 4 BITMAP INDEX (SINGLE VALUE) OF
'CUST_GENDER_BIX'
7 3 BITMAP MERGE
8 7 BITMAP INDEX (RANGE SCAN) OF
'CUST_YOB_BIX'
Hint Description
NO_INDEX Disallows use of any indexes
SELECT PLAN_TABLE_OUTPUT
FROM TABLE(DBMS_XPLAN.DISPLAY(NULL, NULL,
'ALL'));