Why index is not used on an editable view update?
I need help to understand why Oracle 11.2.0.3 is an index for an editable view. When I refer to the base table, offer$, I access index. When I reference the view, offer, I get a comprehensive analysis of the offer$. There's a trigger on the view instead. Who is factor in there somehow?
> EXPLAIN the PLAN FOR
UPDATE OFFER$ SET PRESENTABLE_FLAG = 'F', ACCEPTED_OFFER_FLAG 'T =' WHERE ASSIGNED_OFFER_ID = (SELECT SOLICITATION_REF_ID FROM TENDER WHERE SOLICITATION_ID =: B1)
plan FOR successful.
> SELECT * FROM TABLE (DBMS_XPLAN. Display (null, NULL, 'ALL'))
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hash value of plan: 3047622554
-------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
-------------------------------------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT. | 1. 25. 2 (0) | 00:00:01 |
| 1. UPDATE | OFFER$ | | | | |
| 2. TABLE ACCESS BY INDEX ROWID | OFFER$ | 1. 25. 1 (0) | 00:00:01 |
|* 3 | INDEX UNIQUE SCAN | AK_OFFER_ASSIGNED_OFFER_ID | 1. | 1 (0) | 00:00:01 |
| 4. TABLE ACCESS BY INDEX ROWID | TENDER $ | 1. 20. 1 (0) | 00:00:01 |
|* 5 | INDEX UNIQUE SCAN | PK_SOLICITATION$ | 1. | 1 (0) | 00:00:01 |
-------------------------------------------------------------------------------------------------------------
Name of the query block / Alias object (identified by the operation identity card):
-------------------------------------------------------------
1 UPD$ 1
2 UPD$ 1 / OFFER$@UPD$1
3 UPD$ 1 / OFFER$@UPD$1
4 SALT$ F5BB74E1 / SOLICITATION$@SEL$2
5. SALT$ F5BB74E1 / SOLICITATION$@SEL$2
Information of predicates (identified by the operation identity card):
---------------------------------------------------
3 - access ("ASSIGNED_OFFER_ID" = (SELECT "SOLICITATION_REF_ID" FROM KOHP." "TENDER CALL $ '.
"TENDER CALL $ ' WHERE 'SOLICITATION_ID' = TO_NUMBER (:B1)))
5 - access ('SOLICITATION_ID' = TO_NUMBER (:B1))
Projection of the column information (identified by the operation identity card):
-----------------------------------------------------------
2 - (upd = 4, 6, 7 cmp = 3, 7; cpy = 2, 4, 5) "OFFER$". ROWID [ROWID, 10], "OFFER$". " DECISION_ID '[NUMBER, 22],
"ASSIGNED_OFFER_ID" [VARCHAR2, 255], "ACCEPTED_OFFER_FLAG" [CHARACTER, 1],
"OFFER$". " CURRENT_OFFER_FLAG "[CHARACTER, 1],"PRESENTABLE_FLAG "[CHARACTER, 1],"
"OFFER$". " CHNG_DTTM ' [TIMESTAMP, 11].
3. "OFFER$". ROWID [ROWID, 10], "ASSIGNED_OFFER_ID" [VARCHAR2, 255]
4. "TENDER CALL $ '. ROWID [ROWID, 10], "SOLICITATION_ID" [NO.22].
"SOLICITATION_REF_ID" [VARCHAR2, 50]
5. "TENDER CALL $ '. ROWID [ROWID, 10], "SOLICITATION_ID" [NO.22]
40 selected lines
> EXPLAIN the PLAN FOR
UPDATE OFFER SET PRESENTABLE_FLAG = 'F', ACCEPTED_OFFER_FLAG 'T =' WHERE ASSIGNED_OFFER_ID = (SELECT SOLICITATION_REF_ID FROM TENDER WHERE SOLICITATION_ID =: B1)
plan FOR successful.
> SELECT * FROM TABLE (DBMS_XPLAN. Display (null, NULL, 'ALL'))
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hash value of plan: 1083159671
--------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
--------------------------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT. | 958K | 987 M | 9182 (1) | 00:01:51 |
| 1. UPDATE | OFFER | | | | |
|* 2 | VIEW | OFFER | 958K | 987 M | 9181 (1) | 00:01:51 |
| 3. TABLE ACCESS FULL | OFFER$ | 958K | 127 M | 9181 (1) | 00:01:51 |
| 4. TABLE ACCESS BY INDEX ROWID | TENDER $ | 1. 20. 1 (0) | 00:00:01 |
|* 5 | INDEX UNIQUE SCAN | PK_SOLICITATION$ | 1. | 1 (0) | 00:00:01 |
--------------------------------------------------------------------------------------------------
Name of the query block / Alias object (identified by the operation identity card):
-------------------------------------------------------------
1 UPD$ 1
2 SALT$ 1 / OFFER@UPD$1
3 SALT$ 1 / OFFER$@SEL$1
4 SALT$ 335DD26A / SOLICITATION$@SEL$3
5. SALT$ 335DD26A / SOLICITATION$@SEL$3
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - filter ("ASSIGNED_OFFER_ID" = (SELECT "SOLICITATION_REF_ID" FROM
KOHP. ' ' TENDER $ "" PROMPT$ ' WHERE 'SOLICITATION_ID' = TO_NUMBER (:B1)))
5 - access ('SOLICITATION_ID' = TO_NUMBER (:B1))
Projection of the column information (identified by the operation identity card):
-----------------------------------------------------------
2 - (upd = 13, 45; cmp = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 2
7,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50)
'OFFER '. "OFFER_ID" [NO.22], "PROVIDE" "." " DECISION_ID '[NUMBER, 22],
'OFFER '. "OFFER_TYPE_CD" [NO.22], "PROVIDE" "." " PROMO_ID '[NUMBER, 22],
'OFFER '. "PYMT_METHOD_TYPE_CD" [NO.22], "PROVIDE" "." " CS_RESULT_ID '[NUMBER, 22],
'OFFER '. "CS_RESULT_USAGE_TYPE_CD" [NO.22], "PROVIDE" "." " RATE_INDEX_TYPE_CD '[NUMBER, 22],
'OFFER '. "SUB_PRODUCT_ID" [NO.22], "PROVIDE" "." " CAMPAIGN_ID '[NUMBER, 22],
'OFFER '. "MARKET_CELL_ID" [NO.22], "ASSIGNED_OFFER_ID" [VARCHAR2, 255], "" "
"ACCEPTED_OFFER_FLAG" [CHARACTER, 1], 'OFFER '. "CURRENT_OFFER_FLAG"[CHARACTER, 1],
'OFFER '. "OFFER_GOOD_UNTIL_DATE" [DATE, 7], "PROVIDE" "." " RESCINDABLE_DAYS '[NUMBER, 22],
'OFFER '. "RESCINDED_DATE" [DATE, 7], "PROVIDE" "." " AMOUNT '[NUMBER, 22],
'OFFER '. "MAX_AMOUNT" [NO.22], "PROVIDE" "." " AMOUNT_FINANCED '[NUMBER, 22],
'OFFER '. "DOWN_PYMT" [NO.22], "PROVIDE" "." " RATE "[NO.22],"PROVIDE"". "" TERM_MM '[NUMBER, 22],
'OFFER '. "ORIGINATION_FEE_AMOUNT" [NO.22], "PROVIDE" "." " ORIGINATION_FEE_RATE '[NUMBER, 22],
'OFFER '. "FINANCE_CHARGE" [NO.22], "PROVIDE" "." " NBR_OF_PYMTS '[NUMBER, 22],
'OFFER '. "PYMT" [NO.22], "PROVIDE" "." " TOTAL_PYMTS '[NUMBER, 22],
'OFFER '. "FIRST_PYMT_DATE" [DATE, 7], "PROVIDE" "." " CONTRACT_DATE "[DATE, 7],
'OFFER '. "ACCT_NBR" [VARCHAR2, 20], "PROVIDE" "." " ACCT_NBR_ASSIGNED_DTTM ' [TIMESTAMP, 11],
'OFFER '. "ACCT_EXPIRATION_DTTM" [DATE, 8], "PROVIDE" "." " OFFER_DESC ' [VARCHAR2, 255],
'OFFER '. "TIMEOUTMIN_RATE" [NO.22], "PROVIDE" "." " MAX_RATE '[NUMBER, 22],
'OFFER '. "MIN_AMOUNT" [NO.22], "PROVIDE" "." " ANNUAL_FEE_AMOUNT '[NUMBER, 22],
'OFFER '. "ANNUAL_FEE_WAIVED_MM" [NO.22], "PROVIDE" "." " LATE_FEE_PERCENT '[NUMBER, 22],
'OFFER '. "LATE_FEE_MIN_AMOUNT" [NO.22], "PROVIDE" "." " OFFER_SALES_SCRIPT ' [VARCHAR2, 500],
'OFFER '. "OFFER_ORDER" [NO.22], "PRESENTABLE_FLAG"[CHARACTER, 1], "
'OFFER '. "INDEX_RATE" [NO.22], "PROVIDE" "." " ACTV_FLAG ' [VARCHAR2, 1],
'OFFER '. "CORRELATION_ID" [VARCHAR2, 64], "PROVIDE" "." " OFFER_STATUS_TYPE_CD '[NUMBER, 22],
'OFFER '. "PRESENTATION_INSTRUMENT_NBR" [VARCHAR2, 20].
3. "OFFER_ID" [NO.22], "DECISION_ID" [NO.22], "OFFER_TYPE_CD" [NO.22],
"PROMO_ID" [NO.22], "PYMT_METHOD_TYPE_CD" [NO.22], "CS_RESULT_ID" [NO.22],
"CS_RESULT_USAGE_TYPE_CD" [NO.22], "RATE_INDEX_TYPE_CD" [NO.22],
"SUB_PRODUCT_ID" [NO.22], 'CAMPAIGN_ID' [NO.22], "MARKET_CELL_ID" [NO.22],
"ASSIGNED_OFFER_ID" [VARCHAR2, 255], "ACCEPTED_OFFER_FLAG" [CHARACTER, 1],
"CURRENT_OFFER_FLAG" [CHARACTER, 1], "OFFER_GOOD_UNTIL_DATE" [DATE, 7],.
"RESCINDABLE_DAYS" [NO.22], "RESCINDED_DATE" [DATE, 7], 'COME BACK' [NO.22].
"MAX_AMOUNT" [NO.22], "AMOUNT_FINANCED" [NO.22], "DOWN_PYMT" [NO.22],
'RATE' [NO.22], "TERM_MM" [NO.22], "ORIGINATION_FEE_AMOUNT" [NO.22],
"ORIGINATION_FEE_RATE" [NO.22], "FINANCE_CHARGE" [NO.22],
"NBR_OF_PYMTS" [NO.22], "PYMT" [NO.22], "TOTAL_PYMTS" [NO.22],
"FIRST_PYMT_DATE" [DATE, 7], "CONTRACT_DATE" [DATE, 7], ' ACCT_NBR$ ' [RAW, 40].
"ACCT_NBR_ASSIGNED_DTTM" [TIMESTAMP, 11], ' ACCT_EXPIRATION_DTTM$ ' [RAW, 40].
"OFFER_DESC" [VARCHAR2, 255], "TIMEOUTMIN_RATE" [NO.22], "MAX_RATE" [NO.22].
"MIN_AMOUNT" [NO.22], "ANNUAL_FEE_AMOUNT" [NO.22],
"ANNUAL_FEE_WAIVED_MM" [NO.22], "LATE_FEE_PERCENT" [NO.22],
"LATE_FEE_MIN_AMOUNT" [NO.22], "OFFER_SALES_SCRIPT" [VARCHAR2, 500].
"OFFER_ORDER" [NO.22], "PRESENTABLE_FLAG" [CHARACTER, 1], "INDEX_RATE" [NO.22],
"ACTV_FLAG" [VARCHAR2, 1], "CORRELATION_ID" [VARCHAR2, 64].
"OFFER_STATUS_TYPE_CD" [NO.22], ' PRESENTATION_INSTRUMENT_NBR$ ' [RAW, 40]
4. "TENDER CALL $ '. ROWID [ROWID, 10], "SOLICITATION_ID" [NO.22].
"SOLICITATION_REF_ID" [VARCHAR2, 50]
5. "TENDER CALL $ '. ROWID [ROWID, 10], "SOLICITATION_ID" [NO.22]
82 selected lines
CREATE OR REPLACE FORCE VIEW "OFFER" ("OFFER_ID","DECISION_ID","OFFER_TYPE_CD","PROMO_ID","PYMT_METHOD_TYPE_CD","CS_RESULT_ID","CS_RESULT_USAGE_TYPE_CD","RATE_INDEX_TYPE_CD","SUB_PRODUCT_ID","CAMPAIGN_ID","MARKET_CELL_ID","ASSIGNED_OFFER_ID","ACCEPTED_OFFER_FLAG","CURRENT_OFFER_FLAG","OFFER_GOOD_UNTIL_DATE","RESCINDABLE_DAYS","RESCINDED_DATE","AMOUNT","MAX_AMOUNT","AMOUNT_FINANCED" ,"DOWN_PYMT","RATE","TERM_MM","ORIGINATION_FEE_AMOUNT","ORIGINATION_FEE_RATE","FINANCE_CHARGE","NBR_OF_PYMTS","PYMT","TOTAL_PYMTS","FIRST_PYMT_DATE","CONTRACT_DATE","ACCT_NBR","ACCT_NBR_ASSIGNED_DTTM","ACCT_EXPIRATION_DTTM","OFFER_DESC","MIN_RATE","MAX_RATE","MIN_AMOUNT","ANNUAL_FEE_AMOUNT","ANNUAL_FEE_WAIVED_MM","LATE_FEE_PERCENT","LATE_FEE_MIN_AMOUNT","OFFER_SALES_SCRIPT","OFFER_ORDER","PRESENTABLE_FLAG" « INDEX_RATE » 'INSRT_DTTM', 'INSRT_USR_ID', 'CHNG_DTTM', 'CHNG_USR_ID', 'ACTV_FLAG', 'CORRELATION_ID', 'OFFER_STATUS_TYPE_CD', 'PRESENTATION_INSTRUMENT_NBR')
AS
SELECT
OFFER_ID
DECISION_ID
OFFER_TYPE_CD
PROMO_ID
PYMT_METHOD_TYPE_CD
CS_RESULT_ID
CS_RESULT_USAGE_TYPE_CD
RATE_INDEX_TYPE_CD
SUB_PRODUCT_ID
CAMPAIGN_ID
MARKET_CELL_ID
ASSIGNED_OFFER_ID
ACCEPTED_OFFER_FLAG
CURRENT_OFFER_FLAG
OFFER_GOOD_UNTIL_DATE
RESCINDABLE_DAYS
RESCINDED_DATE
QUANTITY
MAX_AMOUNT
AMOUNT_FINANCED
DOWN_PYMT
RATE
TERM_MM
ORIGINATION_FEE_AMOUNT
ORIGINATION_FEE_RATE
FINANCE_CHARGE
NBR_OF_PYMTS
DATED THE
TOTAL_PYMTS
FIRST_PYMT_DATE
CONTRACT_DATE
, CAST (zcrypto.decrypt (ACCT_NBR$) AS VARCHAR2 (20)) ACCT_NBR
ACCT_NBR_ASSIGNED_DTTM
, ACCT_EXPIRATION_DTTM TO_DATE (zcrypto.decrypt (ACCT_EXPIRATION_DTTM$))
OFFER_DESC
TIMEOUTMIN_RATE
MAX_RATE
MIN_AMOUNT
ANNUAL_FEE_AMOUNT
ANNUAL_FEE_WAIVED_MM
LATE_FEE_PERCENT
LATE_FEE_MIN_AMOUNT
OFFER_SALES_SCRIPT
OFFER_ORDER
PRESENTABLE_FLAG
INDEX_RATE
INSRT_DTTM
INSRT_USR_ID
CHNG_DTTM
CHNG_USR_ID
ACTV_FLAG
CORRELATION_ID
OFFER_STATUS_TYPE_CD
, CAST (zcrypto.decrypt (PRESENTATION_INSTRUMENT_NBR$) AS VARCHAR2 (20)) PRESENTATION_INSTRUMENT_NBR
Of
OFFER$;
CREATE OR REPLACE TRIGGER "OFFER_IO" INSTEAD OF
INSERT OR
UPDATE
THEN OFFER REFERENCING NEW AS NEW AS OF OLD FOR THE BEGINNING OF EACH ROW SO (INSERT)
INSERT
IN
OFFER$
(
OFFER_ID
DECISION_ID
OFFER_TYPE_CD
PROMO_ID
PYMT_METHOD_TYPE_CD
CS_RESULT_ID
CS_RESULT_USAGE_TYPE_CD
RATE_INDEX_TYPE_CD
SUB_PRODUCT_ID
CAMPAIGN_ID
MARKET_CELL_ID
ASSIGNED_OFFER_ID
ACCEPTED_OFFER_FLAG
CURRENT_OFFER_FLAG
OFFER_GOOD_UNTIL_DATE
RESCINDABLE_DAYS
RESCINDED_DATE
QUANTITY
MAX_AMOUNT
AMOUNT_FINANCED
DOWN_PYMT
RATE
TERM_MM
ORIGINATION_FEE_AMOUNT
ORIGINATION_FEE_RATE
FINANCE_CHARGE
NBR_OF_PYMTS
DATED THE
TOTAL_PYMTS
FIRST_PYMT_DATE
CONTRACT_DATE
, ACCT_NBR$
ACCT_NBR_ASSIGNED_DTTM
, ACCT_EXPIRATION_DTTM$
OFFER_DESC
TIMEOUTMIN_RATE
MAX_RATE
MIN_AMOUNT
ANNUAL_FEE_AMOUNT
ANNUAL_FEE_WAIVED_MM
LATE_FEE_PERCENT
LATE_FEE_MIN_AMOUNT
OFFER_SALES_SCRIPT
OFFER_ORDER
PRESENTABLE_FLAG
INDEX_RATE
ACTV_FLAG
CORRELATION_ID
OFFER_STATUS_TYPE_CD
, PRESENTATION_INSTRUMENT_NBR$
)
VALUES
(
: NEW. OFFER_ID
,: NEW. DECISION_ID
,: NEW. OFFER_TYPE_CD
,: NEW. PROMO_ID
,: NEW. PYMT_METHOD_TYPE_CD
,: NEW.CS_RESULT_ID
,: NEW.CS_RESULT_USAGE_TYPE_CD
,: NEW. RATE_INDEX_TYPE_CD
,: NEW. SUB_PRODUCT_ID
,: NEW. CAMPAIGN_ID
,: NEW. MARKET_CELL_ID
,: NEW. ASSIGNED_OFFER_ID
,: NEW. ACCEPTED_OFFER_FLAG
,: NEW. CURRENT_OFFER_FLAG
,: NEW. OFFER_GOOD_UNTIL_DATE
,: NEW. RESCINDABLE_DAYS
,: NEW. RESCINDED_DATE
,: NEW. AMOUNT
,: NEW. MAX_AMOUNT
,: NEW. AMOUNT_FINANCED
,: NEW. DOWN_PYMT
,: NEW. RATE
,: NEW. TERM_MM
,: NEW. ORIGINATION_FEE_AMOUNT
,: NEW. ORIGINATION_FEE_RATE
,: NEW. FINANCE_CHARGE
,: NEW. NBR_OF_PYMTS
,: NEW. DATED THE
,: NEW. TOTAL_PYMTS
,: NEW. FIRST_PYMT_DATE
,: NEW. CONTRACT_DATE
, zcrypto.encrypt (: NEW.) ACCT_NBR)
,: NEW. ACCT_NBR_ASSIGNED_DTTM
, zcrypto.encrypt (: NEW.) ACCT_EXPIRATION_DTTM)
,: NEW. OFFER_DESC
,: NEW. TIMEOUTMIN_RATE
,: NEW. MAX_RATE
,: NEW. MIN_AMOUNT
,: NEW. ANNUAL_FEE_AMOUNT
,: NEW. ANNUAL_FEE_WAIVED_MM
,: NEW. LATE_FEE_PERCENT
,: NEW. LATE_FEE_MIN_AMOUNT
,: NEW. OFFER_SALES_SCRIPT
,: NEW. OFFER_ORDER
,: NEW. PRESENTABLE_FLAG
,: NEW. INDEX_RATE
,: NEW. ACTV_FLAG
,: NEW. CORRELATION_ID
,: NEW. OFFER_STATUS_TYPE_CD
, zcrypto.encrypt (: NEW.) PRESENTATION_INSTRUMENT_NBR)
);
ON THE OTHER
UPDATE
OFFER$
SET
DECISION_ID =: NEW. DECISION_ID
, OFFER_TYPE_CD =: NEW. OFFER_TYPE_CD
, PROMO_ID =: NEW. PROMO_ID
, PYMT_METHOD_TYPE_CD =: NEW. PYMT_METHOD_TYPE_CD
, CS_RESULT_ID =: NEW.CS_RESULT_ID
, CS_RESULT_USAGE_TYPE_CD =: NEW.CS_RESULT_USAGE_TYPE_CD
, RATE_INDEX_TYPE_CD =: NEW. RATE_INDEX_TYPE_CD
, SUB_PRODUCT_ID =: NEW. SUB_PRODUCT_ID
, = CAMPAIGN_ID: NEW. CAMPAIGN_ID
, MARKET_CELL_ID =: NEW. MARKET_CELL_ID
, ASSIGNED_OFFER_ID =: NEW. ASSIGNED_OFFER_ID
, ACCEPTED_OFFER_FLAG =: NEW. ACCEPTED_OFFER_FLAG
, CURRENT_OFFER_FLAG =: NEW. CURRENT_OFFER_FLAG
, OFFER_GOOD_UNTIL_DATE =: NEW. OFFER_GOOD_UNTIL_DATE
, RESCINDABLE_DAYS =: NEW. RESCINDABLE_DAYS
, RESCINDED_DATE =: NEW. RESCINDED_DATE
, QUANTITY =: NEW. AMOUNT
, MAX_AMOUNT =: NEW. MAX_AMOUNT
, AMOUNT_FINANCED =: NEW. AMOUNT_FINANCED
, DOWN_PYMT =: NEW. DOWN_PYMT
,RATE = :NEW. RATE
, TERM_MM =: NEW. TERM_MM
, ORIGINATION_FEE_AMOUNT =: NEW. ORIGINATION_FEE_AMOUNT
, ORIGINATION_FEE_RATE =: NEW. ORIGINATION_FEE_RATE
, FINANCE_CHARGE =: NEW. FINANCE_CHARGE
, NBR_OF_PYMTS =: NEW. NBR_OF_PYMTS
,PYMT = :NEW. DATED THE
, TOTAL_PYMTS =: NEW. TOTAL_PYMTS
, FIRST_PYMT_DATE =: NEW. FIRST_PYMT_DATE
, CONTRACT_DATE =: NEW. CONTRACT_DATE
, ACCT_NBR$ = zcrypto.encrypt (: NEW.) ACCT_NBR)
, ACCT_NBR_ASSIGNED_DTTM =: NEW. ACCT_NBR_ASSIGNED_DTTM
, ACCT_EXPIRATION_DTTM$ = zcrypto.encrypt (: NEW.) ACCT_EXPIRATION_DTTM)
, OFFER_DESC =: NEW. OFFER_DESC
, TIMEOUTMIN_RATE =: NEW. TIMEOUTMIN_RATE
, MAX_RATE =: NEW. MAX_RATE
, MIN_AMOUNT =: NEW. MIN_AMOUNT
, ANNUAL_FEE_AMOUNT =: NEW. ANNUAL_FEE_AMOUNT
, ANNUAL_FEE_WAIVED_MM =: NEW. ANNUAL_FEE_WAIVED_MM
, LATE_FEE_PERCENT =: NEW. LATE_FEE_PERCENT
, LATE_FEE_MIN_AMOUNT =: NEW. LATE_FEE_MIN_AMOUNT
, OFFER_SALES_SCRIPT =: NEW. OFFER_SALES_SCRIPT
, OFFER_ORDER =: NEW. OFFER_ORDER
, PRESENTABLE_FLAG =: NEW. PRESENTABLE_FLAG
, INDEX_RATE =: NEW. INDEX_RATE
, ACTV_FLAG =: NEW. ACTV_FLAG
, CORRELATION_ID =: NEW. CORRELATION_ID
, OFFER_STATUS_TYPE_CD =: NEW. OFFER_STATUS_TYPE_CD
, PRESENTATION_INSTRUMENT_NBR$ = zcrypto.encrypt (: NEW.) PRESENTATION_INSTRUMENT_NBR)
WHERE
OFFER_ID =: NEW. OFFER_ID;
END IF;
END;
/
zsysdba wrote:
I need help to understand why Oracle 11.2.0.3 is an index for an editable view. When I refer to the base table, offer$, I access index. When I reference the view, offer, I get a comprehensive analysis of the offer$. There's a trigger on the view instead. Who is factor in there somehow?
Almost certainly.
Even if the view has not used the calls to the function and the trigger was simply "null;" as the body, the presence of the trigger seems to prevent the optimizer to push the subquery view internal and down to the index (and there is no change in 12 c).
Concerning
Jonathan Lewis
Tags: Database
Similar Questions
-
Why index is not used by the subquery?
Hello
ENV: 11 GR 2 on Linux Oracle 5.8 64 bit on file system,
I have the following query:
Select * to processing_instruction pi where pi.last_updated = (select / * + index (idx_pi_client_merchant_status FT2) * / max (pi2.last_updated))
to processing_instruction FT2
where pi2.client_no = pi.client_no
and pi2.merchant_id = pi.merchant_id
and pi2.status = 'C')
I created an index:
CREATE INDEXES TO PROCESSING_INSTRUCTION IDX_PI_CLIENT_MERCHANT_STATUS
(CLIENT_NO, MERCHANT_ID, STATUS)
Oracle still does a full-table scan on the ' processing_instruction FT2 ' table (subquery) even though I also put the indicator INDEX.» The table has rows '55621245 '. There are several lines for a given client_no, the merchant_id and status 'C '. I want to only choose one that has been updated the last (newest one).
I'm sure there may be a better way to do this, but...
Please notify.
Concerning
the order of the keys, and the columns questions
Try (status, last_updated)
-
Why can I not use ready boost with flash player in my home premiun wvista?
Why can I not use ready boost with flash player in my home premiun wvista?
Hello
This Flash drive is probably too slow for configure ReadyBoost.
Here is some information that should help you:
ReadyBoost
http://www.vista4beginners.com/ReadyBoostWhat is ReadyBoost
http://www.winvistatips.com/ReadyBoost-T25.html
Explore the features: Windows ReadyBoost
http://Windows.Microsoft.com/en-us/Windows7/products/features/ReadyBoostUnderstand the ReadyBoost and the question of whether it will Speed Up your system
http://TechNet.Microsoft.com/en-us/magazine/ff356869.aspxDON'T GO OUT AND JUST BUY A READER WHO CLAIMS THAT IT IS READYBOOST
LOAN - many are lying or stretching at least the truth. Look at the sides of the player below
and buy one you know is FAST.
Don't forget that the readyboost max cache is 4 GB Vista and 256 GB Windows 7. If your device
is more than you can use it for storage. And you need a fast reader.ReadyBoost - list of speed Flash memory
http://www.techcrater.com/2007/04/05/ReadyBoost-Flash-memory-speed-list/How to find the index of ReadyBoost speed
http://www.techcrater.com/2007/04/06/how-to-find-ReadyBoost-speed-rating/Speed tests USB Flash Drive - any size car - link to the utility USBDeview
http://usbspeed.NirSoft.NET/Publish a speed test of your USB - also a link to the utility USBDeview flash drive
http://usbspeed.NirSoft.NET/publish_usb_flash_drive_speed.htmlhttp://www.grantgibson.co.uk/misc/ReadyBoost/?make=SanDisk
http://www.techcrater.com/2007/04/05/ReadyBoost-Flash-memory-speed-list/
I hope this helps.
Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.
-
Why can I not use my old genuine copy of windows Vista on my new pc?
Windows vista on new pc
Why can I not use my old genuine copy of windows vista on my new pc?
I received an activation message and I don't know what to doIf your Vista came pre-installed in your old PC, then this is an OEM license that cannot be transferred to your new PC.
To analyze and solve problems for Activation and Validation, we need to see a full copy of the report produced by the MGADiag (download and save to the desktop - http://go.microsoft.com/fwlink/?linkid=52012 ) tool
Once saved, run the tool.
Click on the button continue, which will produce the report.
To copy the report in your response, click the button copy in the tool (ignore the error at this stage), and then paste (using r-click and paste or Ctrl + V) in your response.
-* in your own thread *, pleasePlease also state the Version and edition of Windows cited on your COA sticker (if you have one) on the case with your machine, but do NOT quote the key on the sticker!
http://www.Microsoft.com/howtotell/content.aspx?PG=COA -
Hi forum
Dynamically generated in this query:
SELECT TITULO_MEDIODEPAGO AS TITLE, IDA_MEDIODEPAGO AS IDA, COUNT (DISTINCT VISTA. ID1 | VISTA. ID2. VISTA. ID3) AS AMOUNT
OF MVISTA VISTA
WHERE ((COALESCE (VISTA. FECHAEXPIRACION, TO_DATE (' 01/01/9999 ',' dd/mm/yyyy ""))) > = SYSDATE) AND
((1=1) OR: p_rubro IS NULL) AND ((1=1) OR: p_subrubro IS NULL) AND
(VISTA. TITULO_PROVINCIA =: p_provincia) AND ((1=1) OR: p_ciudad IS NULL) AND
((1=1) OR: p_barrio IS NULL) AND ((1=1) OR: p_mediopago IS NULL) AND
((1=1) OR: p_nrocuotas IS NULL) AND ((1=1) OR: p_porcentaje IS NULL) AND
((1=1) OR: p_dias IS NULL) AND ((1=1) OR: p_textoBusqueda IS NULL)
TITULO_MEDIODEPAGO GROUP, IDA_MEDIODEPAGO
: p_rubro is null
: p_subrubro is null
: p_provincia = "PROV1.
: p_barrio is null
: p_mediopago is null
: p_nrocuotas is null
: p_porcentaje is null
: p_dias is null
: p_textoBusqueda is null
When I inspect the plan to explain it, I could see a full analysis on the materialized view MVISTA operation. I want to avoid this analysis complements the view with 500 k lines:
MAT_VIEW_ACCESS MVISTA Filter predicates
AND NLSSORT (VISTA. TITULO_PROVINCIA, "nls_sort = 'BINART_AI'") = NLSSORT (: P_PROVINCIA "nls_sort =" BINARY_AI"') COALESCE (VISTA. FECHAEXPIRACION, TIMESTAMP'9999-01-01 00:00:00 ') > = SYSDATE @! I add an index to the materialized view 'MVISTA' TITULO_PROVINCIA (CSA) and FECHAEXPIRACION (CSA) fields, but it is not used by the query. Why the index is not used? How to define the index serve him?
Thank you very much
One of the reasons for the index is not used because you apply the function nlssort on a single column.
You must use an index of feature based using this function instead.
In addition, I would rewrtite him coalesce to
(VISTA. FECHAEXPIRACION > = SYSDATE or VISTA. FECHAEXPIRACION is null)
-
Index is not used, although suspicion.
DBVersion: 10.2.0.3
When I use a select statement like that no index on tabel 'walze w2' is used:CREATE TABLE "ESW"."DURCHLAUFZEIT_SONDER_AG" ( "AG" NUMBER(3,0) DEFAULT 0 NOT NULL ENABLE, "TAGE" NUMBER(5,0) DEFAULT 0 NOT NULL ENABLE, "ABTEILUNG" VARCHAR2(20 BYTE), Content of this table AG TAGE ABTEILUNG 910 1 EAV 133 1 TG 743 2 TM 719 2 TM 706 2 TM 979 10 TM
When I run the same sql to the delivery of the selection from tabel 'durchlaufzeit_sonder_ag' by my own index is used:select /*+ index(apl(arbeitsgang_nr))*/ /*+ index(w2 WALZE_IND1)*/ SUM (dsa.tage) tage, w2.walzen_nr walzen_nr, w2.walzen_ng walzen_ng from durchlaufzeit_sonder_ag dsa, auftrag_arbeitsplan apl, walze w2 where apl.arbeitsgang_nr in ( select dsa1.ag ag from durchlaufzeit_sonder_ag dsa1 where dsa1.abteilung = 'TM' )*and apl.auftr_nr = w2.auftr_nr and apl.auftr_jj = w2.auftr_jj and apl.auftr_pos = w2.auftr_pos and apl.auftr_los = w2.auftr_los and dsa.abteilung = 'TM' and dsa.ag = apl.arbeitsgang_nr GROUP BY w2.walzen_nr, w2.walzen_ng; -------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | -------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 21 | 1155 | 4927 | | 1 | SORT GROUP BY | | 21 | 1155 | 4927 | |* 2 | HASH JOIN | | 21 | 1155 | 4922 | | 3 | NESTED LOOPS | | 333 | 11655 | 4682 | | 4 | NESTED LOOPS | | 16215 | 427K| 4682 | | 5 | TABLE ACCESS BY INDEX ROWID| DURCHLAUFZEIT_SONDER_AG | 4 | 40 | 2 | |* 6 | INDEX RANGE SCAN | DURCHLAUFZEIT_SONDER_AG_INDEX1 | 4 | | 1 | | 7 | TABLE ACCESS BY INDEX ROWID| AUFTRAG_ARBEITSPLAN | 4054 | 68918 | 1170 | |* 8 | INDEX RANGE SCAN | AUFTRAG_ARBEITSPLAN_IND3 | 4054 | | 7 | |* 9 | INDEX RANGE SCAN | DURCHLAUFZEIT_SONDER_AG_INDEX2 | 1 | 8 | | | 10 | *TABLE ACCESS FULL* | WALZE | 75432 | 1473K| 239 | --------------------------------------------------------------------------------------------------
I don't understand this. Why oracle do not use index (provided in the indicator) when I select the values in the durchlaufzeit_sonder_ag table, but when they provide my own values, it uses the index?select /*+ index(apl(arbeitsgang_nr))*/ /*+ index(w2 WALZE_IND1)*/ SUM (dsa.tage) tage, w2.walzen_nr walzen_nr, w2.walzen_ng walzen_ng from durchlaufzeit_sonder_ag dsa, auftrag_arbeitsplan apl, walze w2 where apl.arbeitsgang_nr in ( 743, 719, 706, 979 ) and apl.auftr_nr = w2.auftr_nr and apl.auftr_jj = w2.auftr_jj and apl.auftr_pos = w2.auftr_pos and apl.auftr_los = w2.auftr_los and dsa.abteilung = 'TM' and dsa.ag = apl.arbeitsgang_nr GROUP BY w2.walzen_nr, w2.walzen_ng; --------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | --------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2 | 94 | 1161 | | 1 | SORT GROUP BY | | 2 | 94 | 1161 | | 2 | TABLE ACCESS BY INDEX ROWID | WALZE | 1 | 20 | 2 | | 3 | NESTED LOOPS | | 2 | 94 | 1156 | |* 4 | HASH JOIN | | 31 | 837 | 1094 | | 5 | INLIST ITERATOR | | | | | | 6 | TABLE ACCESS BY INDEX ROWID| DURCHLAUFZEIT_SONDER_AG | 3 | 30 | 2 | |* 7 | INDEX RANGE SCAN | DURCHLAUFZEIT_SONDER_AG_INDEX2 | 3 | | 1 | | 8 | INLIST ITERATOR | | | | | | 9 | TABLE ACCESS BY INDEX ROWID| AUFTRAG_ARBEITSPLAN | 2276 | 38692 | 1091 | |* 10 | INDEX RANGE SCAN | AUFTRAG_ARBEITSPLAN_IND3 | 2276 | | 8 | |* 11 | INDEX RANGE SCAN | WALZE_IND1 | 1 | | 1 | ---------------------------------------------------------------------------------------------------
As far as I know only the first comment of suspicion in a given query block is considered.
So it would be valid (unless hint_one is specified correctly)...
SELECT /*+ hint_one hint_two */ column_name FROM table_name; SELECT /*+ hint_one hint_two */ column_name FROM table_name; SELECT /*+ hint_one hint_two */ column_name FROM table_name; SELECT --+ hint_one hint_two column_name FROM table_name;
But this should not (regardless of if hint_one is specified correctly)...
SELECT /*+ hint_one */ /*+ hint_two */ column_name FROM table_name;
Also I do not believe your INDEX index specification is correct, a single set of brackets should be used and the alias name and index table must be separated by a space or a comma.
So it would be nice...
SELECT /*+ INDEX (table_alias index_name) */ column_name FROM table_name; SELECT /*+ INDEX (table_alias, index_name) */ column_name FROM table_name;
But it would not...
SELECT /*+ INDEX (table_alias (index_name)) */ column_name FROM table_name;
Also, you should be aware that an INDEX indicator is only considered provided that supports a given join order.
-
Why can I not use my ITunes credit to buy a movie on Apple TV?
Why can I not use my Itunes credit to rent a movie on Apple TV?
the credit, which I like to use is the same that if I buy an App?
Apple TV wants to charge my credit card to rent a movie
You can use the credit to rent a movie on Apple TV. Your card will be charged if the credit is not sufficient to cover the rental
-
Why can I not use three fingers to drag an item on my screen?
Why can I not use three fingers to drag an item on my screen?
There is no option in the preferences system - trackpad.
How can I go back to os x? I am not happy with El Capitan
Thank you
-
Why can I not use shift to select several thumbnails of Pages?
Why can I not use the SHIFT key to select several thumbnails of Pages? I need to transfer several pages in the Pages of a document to another document, and I can't select these multiple pages in the thumbnails by pressing the shift or command key. Help, please!
By selecting several thumbnails, and copy and paste any thumbnails in another document of v5.6.1 Pages is not supported. You get to select the contents of a real individual page and then copy and paste between documents.
In Pages ' 09 v4.3, you can select several thumbnails and then copy / paste these in the Gallery of thumbnails of another document. If the Pages ' 09 has been installed prior to any publication pages v5, older Pages move silently in Applications: iWork ' 09 file. You would have to export your content Pages v5.6.1 as document Pages ' 09 for backward compatibility.
-
Hi all
I am new to TestStand. Still in the learning process.
What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?
Thanks in advance,
LaVIEWan
I'm sorry... I discovered that... its not at all possible to pass data to another sequence using variables... it must be through settings... once again I apologize for the display of such a stupid question
-
After the cancellation of my subscription, why can I not use my old previous Adobe products?
I thought my old apps (CC and CC2014) would always work
N °
When you cancel your subscription, all software related to that subscription will stop working. This includes any software with CC in his name.
The only way to continue to use the CC versions is to re - register.
All versions perpetually under license that was purchased before you subscribed for example, CS4, CS5, CS6 will continue to work as usual.
-
Why can I not use my CS5 serial number on my new mac?
Why can I not use my CS5 serial number on my new mac?
What is the error message you see?
Error "serial number is not valid for this product". Creative Suite can help
-
I just bought a new Mac and migrated my CS6 on. Now, when I open it, I said that I am under a trial of the cloud. Why can I not use my CS6 version that I bought? I don't want to pay for something I already bought.
Here's how to convert the Permanent Trail:
By receiving the expired Trial/test screen
Make sure you are online
Click on software under license
The perpetual owners: connect with the adobe ID and enter the serial number of the product
Product must be certified with success
-
Why can I not use mobile link in drive on window Vista?
Why can I not use mobile link in drive on window Vista?
Mobile link is not supported in products 10.x. download version 11.
-
Why can I not use hidden or display point only to store the value for insertion?
Hi, gurus:
I have a question:
I implemented a form with the region of report in a page, the update works OK, but the add function has a problem:
There is a column, offender_ID, which is a foreign key to another table, it must not be null during insertion. However, even I pass the ID of the author of the offence of master page when user click on the button create and he did watch in the form, it must be a text tabled for insert success, why can I not use hidden or display point only to store this value for insert? (If I use hidden or display single element insert will be successful, apex reports I tried to insert a null value for the offender_ID column.)
Thanks in advance.
SamHello
There is a column, offender_ID, which is a foreign key to another table, it must not be null during insertion. However, even I pass the ID of the author of the offence of master page when user click on the button create and he did watch in the form, it must be a text tabled for insert success, why can I not use hidden or display point only to store this value for insert? (If I use hidden or display single element insert will be successful, apex reports I tried to insert a null value for the offender_ID column.)
I think that both hidden and display elements have attributes that can cause problems because of different ways these function elements as the only non-display and feature no hidden items. The only items have a "Save Session State' yes/no 'control'? This can be a problem.
Would you do that? Do these regular items instead and see if you can get those working. Then, we will try to change the fields back to hidden or display only.
Howard
Congratulations. I'm glad you found the solution.
Published by: Howard (in training) April 11, 2013 10:26
Maybe you are looking for
-
HP 15-g012dx laptop (ENER: driver error)
I get a message in my 'Devince Manager' that there is no driver found for "Controllers of USB Bus, SM Bus controller and Ethernet controller" Please helpAnd also one of my USB ports work the rest suddenly stopped Help, please
-
Upgrading a processor i5 - 2430M to a processor i7-#.
I was wondering if it would be possible to be upgraded to an i7 to leave an i5 processor. I have a HP Pavilion Dv6t - 6 c 00 Entertainment Notebook. If this is not possible, would it be possible to move to a 3rd generation and 4th generation processo
-
Question about Webwork and JQuery
Hi all, I'm really a beginner for webwork development, here are some of my question on the development of webwork. I want to develop an application on OS 5?, is webwork development can be used to develop the app for OS 5 or only compressed version ad
-
Google chrome compatibility windows 7
Running Windows 7 ULTIMATE, BUT IS not COMPATIBLE WITH GOOGLE CHROME... WHAT SHOULD I DO TO FIX THIS? Sometimes Windows stops working when STARTING GOOGLE CHROME
-
Word Perfect is not compatible with Windows 7. What can I use instead?
WordPerfect or treatment. I've recently updated my computer to windows 7. I used to have the perfect word, but it is not compatible with this new set up. How can I go on writing documents or summaries. Do I have to buy a new cd to upgrade from word p