How Can Improve On Slow Update Query Using /*+ NO_XML_DML_REWRITE */?

We have an update query recently brought to my attention that is running extremely slow on Oracle 11.2.0.1 against a secure file binary XML table using
update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 .
I am told the majority/near majority of the ~ 16 fields are updated. Also this table has numerous predefined virtual columns with fn based indexes on them.
My first inclination was to recast this using the Oracle updatexml function. I was told, the /*+ NO_XML_DML_REWRITE */ hint would also be necessary here.
update /*+ NO_XML_DML_REWRITE */
<tble_name> a
set a.object_value = updatexml(a.object_value ...).
Last year our dba's were instructed by Oracle Support to use this hint, as the update wasn't updating any records w.o any error msgs.
+1. Hoping to find out if anyone has run across using this hint in some capacity and what was their experience?+
In trying to optimizie this update statement, I'll start from scratch not using the /*+ NO_XML_DML_REWRITE */ hint and will commence with using the updatexml function with setting up an xmlindex.
+2. Hoping to receive some suggestions on creating the proper xmlindex - figuring an unstructured index. If get some good performance with the xmlindex; hoping to retire some of the virtual column usage.+
+3. Any suggestions on living with virtual columns in conjunction with xmlindexes? See the action table definition and associated ivirtual columns and indexes. This table seems over indexed...+
REATE
  TABLE "CROUTREACH"."ACTION" OF XMLTYPE
    CONSTRAINT "ACTN_ID_PK" PRIMARY KEY ("ACTN_ID") USING INDEX PCTFREE 10
    INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
    1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
    FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
    DEFAULT) TABLESPACE "ACME_DATA" ENABLE
  XMLTYPE STORE AS SECUREFILE BINARY XML
    TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE READS LOGGING
    NOCOMPRESS KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1
    MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
    CELL_FLASH_CACHE DEFAULT)
  ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
    *"ACTION_DEF_URN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                
/action/srvContextPointer/outreachActionDefInfo/@actionDefUrn                                              
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"STAT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
    SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
/action/@status_dt'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
WITH
  TIME ZONE))),
    *"ACT_DEF_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
/action/srvContextPointer/outreachActionDefInfo/@actionDefId'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(20))),
    *"CORRL_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
/action/correlationId'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"STAT_RSN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                                 
/action/statusReason'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(30))),
    *"ACT_APPNT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
    SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
/action/actionAppointment/appointment_dt'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
WITH
  TIME ZONE))),
    *"UPDT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
    SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
/action/@update_dt'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
WITH
  TIME ZONE))),
    *"CRET_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
    SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
/action/@create_dt'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
WITH
  TIME ZONE))),
    *"ACT_SEQ"* AS (CAST(TO_NUMBER(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                   
/action/srvContextPointer/outreachActionDefInfo/@sequence'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2)) AS NUMBER(10))),
    *"SERVICE_DEF_URN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";                                                         
/action/srvContextPointer/serviceDefUrn'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(100))),
    *"ASSIGN_TEAM_CD"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
/action/assignment/@teamCategoryCode'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"ASSIGN_STAFF_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
/action/assignment/staffProfileId'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"ACTION_TYPE"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                     
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; (::)                                                     
local-name-from-QName(QName("http://www.cigna.com/acme/domains/actions/2010/03",/action/@xsi:type))                                                                 
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"ACTN_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/@id'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    *"STATUS"*AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/@status'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(20))),
    *"ACME_MBR_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/acmeMemberId'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50)))
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
    FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
    CELL_FLASH_CACHE DEFAULT
  TABLESPACE "ACME_DATA" ;
CREATE UNIQUE INDEX *"CROUTREACH"."SYS_C0014547"* ON "CROUTREACH"."ACTION"
    "SYS_NC_OID$"
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
    FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
    CELL_FLASH_CACHE DEFAULT
  TABLESPACE "ACME_DATA" ;
CREATE UNIQUE INDEX *"CROUTREACH"."SYS_IL0000082156C00003$$"* ON "CROUTREACH".
  "ACTION"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576
    MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST
    GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "ACME_DATA" PARALLEL (DEGREE 0 INSTANCES 0) ;
CREATE UNIQUE INDEX *"CROUTREACH"."ACTN_ID_PK"* ON "CROUTREACH"."ACTION" (
  "ACTN_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(
  INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
  FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
  CELL_FLASH_CACHE DEFAULT) TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_STAT_RSN_IDX"* ON "CROUTREACH"."ACTION"
      "STAT_RSN"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_UPDT_DT_IDX"* ON "CROUTREACH"."ACTION"
      "UPDT_DT"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_CRET_DT_IDX"* ON "CROUTREACH"."ACTION"
      "CRET_DT"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_STAT_DT_IDX"* ON "CROUTREACH"."ACTION"
      "STAT_DT"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_MBRID_TYP_STAT_IDX"* ON "CROUTREACH"."ACTION"
      "ACME_MBR_ID",
      "ACTION_TYPE",
      "STATUS"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACT_ACTDEF_URN_IDX"* ON "CROUTREACH"."ACTION"
      "ACTION_DEF_URN"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;
  CREATE
    INDEX *"CROUTREACH"."ACTION_ACT_DEF_ID_STATUS_IDX"* ON "CROUTREACH"."ACTION"
      "ACT_DEF_ID",
      "STATUS"
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
      0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT
    TABLESPACE "ACME_DATA" ;Any suggestions much appreciated.
Regards,
Richard Blanchard

odie 63
update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 .
This update pattern is used in the production environment and is slowing the environment down as more xml content is increased. In a new release build, this update pattern against the action table described earlier, is particularly problematic.
Have some more information on the /*+ NO_XML_DML_REWRITE */ hint. It turns out, last year, updates statements would intermittently fail to correctly update silently failing. An Oracle Service Request was created. Over the span of about 5 mnths, Oracle determined a very low level Oracle kernel bug was the culprit. Oracle As a result of this SR, Oracle SUpport created BUG 11939507 <ORA-08102: index key not found during update on xmltable with a virtual column>. This bug is viewable on metalink. Oracle claims this bug has only been oberved on In the interim to 11.2.0.3, Oracle Support mentioned to use /*+ NO_XML_DML_REWRITE */; thus disabling piecewise update.
Here's preface information on this bug:
Bug 11939507: ORA-08102: INDEX KEY NOT FOUND DURING UPDATE ON XMLTABLE WITH VIRTUAL COLUMN  
Bug Attributes
Type B - Defect Fixed in Product Version 12.1
Severity 2 - Severe Loss of Service Product Version 11.2.0.1
Status 80 - Development to Q/A Platform 23 - Oracle Solaris on SPARC (64-bit)
Created 30-Mar-2011 Platform Version 10
Updated 13-Feb-2012 Base Bug -
Database Version 11.2.0.1  
Affects Platforms Generic  
Product Source Oracle  
Hdr: 11939507 11.2.0.1 XDB 11.2.0.1 BINARY PRODID-5 PORTID-23
Abstract: ORA-8102: INDEX KEY NOT FOUND DURING UPDATE ON XMLTABLE WITH VIRTUAL COLUMN*** 03/30/11 12:22 pm ***
BUG TYPE CHOSEN  =============== code   
Component: XML Database  ======================= 
DETAILED PROBLEM DESCRIPTION  ============================ 
The issue happens intermittently when running a batch program with 50  concurrent sessions that involves high concurrent updates.
DIAGNOSTIC ANALYSIS  ===================  reproducible testcase on customer dummy data reproduced by Thomas. 
WORKAROUND?  ===========  No   
TECHNICAL IMPACT  ================  Customer is experiencing this error which is critical to the application  because it causes a home health care provider to possibly lose a couple  hours worth of work and have to start from scratch. The condition has only  accessed concurrently from about 40 threads  
RELATED ISSUES (bugs, forums, RFAs)  ===================================  Bug 8514561 - ORA-8102 WHEN UPDATING TABLE
HOW OFTEN DOES THE ISSUE REPRODUCE AT CUSTOMER SITE?  ====================================================  Intermittent  
DOES THE ISSUE REPRODUCE INTERNALLY?  ====================================  Intermittent
IS A TESTCASE AVAILABLE?  ========================  Yes  The good news is, this bug is corrupting a virtual index column.
I'll try test cases using the update pattern; 'update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 ' - substituting actual values for the bind variables and removing interfering virtual columns. Wil lcompare with and w/o the hint.
This wil address your; "Where does the new values come from? Individual variables?" - and provide sample data.
Presently, this update pattern is used 'blindly' in that when no xml relevent changes are identified, only a couple of the roughly 16 fields are updated - yet the whole document gets updated with this update pattern. When changes occur, the whole document is updated. Will work with updating 1 or 2 fields using updatexml and try the xmlexists function for the predicate.
04/25/12 Update:
odie 63,
Here's a sample xml record from the action securefile binary xml table:
<?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><action xsi:type="AssessmentActionType" status_dt="2012-01-18T19:38:21.077Z" status="not applicable" create_dt="2012-01-17T23:10:16.173Z" id="dfdfdfdfdfddfdfdfdfdfdf" xmlns:ns5="http://www.xxxxx.ddd/exception/definition/schema/2010/01" xmlns="http://www.xxxxxx.ddd/mmm/domains/actions/2010/03" xmlns:ns6="http://www.xxxxx.ddd/mmm/domains/utility/outcome/2010/03" xmlns:ns7="http://www.xxxxxx.ddd/mmm/domains/common/2010/03" xmlns:ns2="http://www.xxxxx.ddd/mmm/messages/actions/2010/03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://www.xxxxx.ddd/mmm/domains/workforce/2010/03" xmlns:ns4="http://www.xxxxxx.ddd/mmm/domains/entitlement/2011/11">
   <acmeMemberId>abcdefghijklmnop</acmeMemberId>
   <advocacyPlanId>qrstuvwxyz</advocacyPlanId>
   <srvContextPointer>
      <serviceDefUrn>urn:coderunner:Medical:Definition:ServiceService:11111:7</serviceDefUrn>
      <outreachActionDefInfo sequence="1" actionDefUrn="urn:xxxxxxxxxx:Medical:Definition:Action:50813:2" actionDefId="xxxxxx">
         <srvContextPath>Access Profile~Why did you access the profile?~Reason for access?</srvContextPath>
      </outreachActionDefInfo>
   </srvContextPointer>
</action>Started out using this update statement against the virtual column a.actn_id. This column is also indexed as a fbi.
UPDATE /*+ NO_XML_DML_REWRITE */ action A
SET A.object_value = updatexml(A.object_value,'/action/@status','triggered','xmlns="http://www.xxxx.vvv/yyy/domains/actions/2010/03"')
where a.actn_id='888a80be-d69f-464d-b3f7-85b6209f918e';
This statment updates fine with and w/o the hint. This hint takes away the piecewise update of the xml document and relies upon the a.actn_id virtual column.
Then removed the reliance on the virtual column using the xmlexists fn.
First did an alter index 'actn_id_pk invisible' to take the virtual column out of consideration by the optimizer.
UPDATE /*+ NO_XML_DML_REWRITE */ action A
SET A.object_value = updatexml(A.object_value,'/action/@status','triggered','xmlns="http://www.xxxx.vvv/yyy/domains/actions/2010/03"')
where xmlexists('$p/action[@id="'888a80be-d69f-464d-b3f7-85b6209f918e'"]' PASSING object_value as "p");
This update runs but doesn't update any columns - with or without the hint.
Also created a basic unstructured xmlindex to remove the full table scan - which worked fine execution plan-wise.
create index action_xmlindex_ix on action (object_value) indextype is xdb.xmlindex;Per the SR on this, the /*+ NO_XML_DML_REWRITE */ disables piecewise update and is a workaround for the bug surrounding virtual column index usage when having many concurrent sessions and updates against a table with millions of xml documents. Getting rid of the virtual column in the predicate removes the need for the workaround hint.
My problem is This update runs but doesn't update any columns. Maybe am missing something or doing a syntax/semantic error ?
Any assistance much appreciated...
Regards,
Rick Blanchard
Edited by: RickBlanchardSRSCigna on Apr 25, 2012 12:52 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Can we rollback the update query using Transaction?

    Can we rollback the Update query by writing the update query with in the transaction, as i am implementing different update queries, sometimes I am mistakenly updating the table without where criteria, which is messing up the table. Is there anyway where
    we can write the update query within a transaction and rollback that particular update query which I am writing. I do have a backup table, but that wont be useful because we are doing lot of updates in a span of minutes. I researches about Apex Sql logs too,
    but we do not have access to download such tools. So, can anyone give me a good solution for this?

    Sure, if you use transaction like this
    begin transaction
    update 1
    update 2
    rollback transaction
    both updates will be rollbacked.
    If you want to always be sure about rows you're about to change, always first try with SELECT statement and put each individual UPDATE into separate transaction with rollback at the end, e.g.
    begin transaction
       select ... where some condition
       update . where same condition
       select ... where same condition to verify update
    rollback transaction
    If your last select showed correct info, change ROLLBACK into COMMIT and re-run that script again to perform the actual update.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How can I make an updatable website using Adobe?

    Hello,
    I am looking to create a website to host my YouTube videos, photographs, other information and a blog, and possibly an online store in the future. I don't know where to begin with this because I'm not sure how easy websites are to update once they have been uploaded (unless you use an online website maker).
    Could someone please advise me on what software I should use (I have created a business website for someone using Muse in the past but it doesn't need regular updating), and also how I should have the website hosted?
    Many thanks,
    Ryan

    Ask in the iWorks forum here:
    https://discussions.apple.com/community/iwork

  • How can I  delete and update records using where conditions?

    I want to delete and update the coherence records with some conditions, I describe it to use SQL as follows:
    delete from "contacts" where getStreet() = "dsada";
    update contacts set getStreet() = "dddd" where getCity() = "ssss";
    Can I use the filter like query to achieve this requirement as follows:
    ValueExtractor::View vHomeStateExtractor = ChainedExtractor::create(
    ChainedExtractor::createExtractors("getHomeAddress.getState"));
    Object::View voStateName = String::create("MA");
    Set::View setResults = hCache->entrySet(
    EqualsFilter::create(vHomeStateExtractor, voStateName));
    I know I can use get and put to achieve this requirement , but it Requires a two-interaction between the client and coherence server. Does it have And another way?
    Thanks very much, and please Forgive my English is not very good.

    Hi,
    You have a couple of options for updating or deleting using a Filter.
    For deleting you can use an Entry Processor and the cache invokeAll method. Using "out of the box" Coherence you can use the ConditionalRemove entry processor. I'm a Java person so the C++ below might not be exactly right but you should get the idea.
    ValueExtractor::View vHomeStateExtractor = ChainedExtractor::create(
    ChainedExtractor::createExtractors("getHomeAddress.getState"));
    Object::View voStateName = String::create("MA");
    hCache->invokeAll(EqualsFilter::create(vHomeStateExtractor, voStateName),
    ConditionalRemove::create(AlwaysFilter.getInstance());For update you would either need to write custom Entry Processor implementations that perform the updates you require or you can use out of the box POF or Reflection ValueUpdaters that update specific fields of the entries in the cache. These valueUpdaters would be wrapped in an UpdaterProcessor so the call would be very similar to the code above.
    JK

  • How can I rewrite this update stmt to improve its poor performance?

    Hi,
    I have the following update stmt that runs for over 6 hours. Here is the SQL and its plan:
                UPDATE TABLE1
                     SET mainveh = 'Y'
                 WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
                        DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                    IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
                               MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                          FROM TABLE1
                         GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac);
    PLAN_TABLE_OUTPUT
    | Id  | Operation             | Name     | Rows  | Bytes |TempSpc| Cost (%CPU)|
    |   0 | UPDATE STATEMENT      |          |     1 |   108 |       |   798K  (1)|
    |   1 |  UPDATE               | TABLE1   |       |       |       |            |
    |   2 |   HASH JOIN           |          |     1 |   108 |  1079M|   798K  (1)|
    |   3 |    TABLE ACCESS FULL  | TABLE1   |    21M|   834M|       |   224K  (1)|
    |   4 |    VIEW               | VW_NSO_1 |    21M|  1364M|       |   440K  (1)|
    |   5 |     SORT GROUP BY     |          |    21M|   794M|  2453M|   440K  (1)|
    |   6 |      TABLE ACCESS FULL| TABLE1   |    21M|   794M|       |   224K  (1)|I'm using Oracle 10.2.0.3. The TABLE1 table has 21 million rows. The update stmt will update about 15 million rows. How can I rewrite this update stmt so it'll perform better? There is a primary index on all the columns selected in the subquery. That is the only index on TABLE1.
    Thank you!
    Edited by: user6053424 on Jul 21, 2010 6:59 AM

    Hi,
    Thank you for your suggestions. There is an index on the columns in the group by, it is the PK index on TABLE1. I'm suspecting that due to the amount of data to update, the optimizer decided that full table scan is cheaper than index scan. I'm very interested in the GTT idea, but still need some help if I decide to create a GTT from the subquery, because if I just do this:
    create global temporary table table1_tmp
    on commit preserve rows
    as SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
               MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
          FROM TABLE1
         GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac;then the original update stmt still has the DECODE and such in it, I'm not sure how much benefit that'll do to us:
    UPDATE TABLE1
                     SET mainveh = 'Y'
                 WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
                        DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
                    IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,???
                          FROM TABLE1);Your input is greatly appreciated! Thanks!

  • Updating PS CC 2014--how can I tell if I am using the latest version?

    I just updated Bridge, PS and LR from the Creative Cloud, but when I went to use them, I was still using the old versions despite the fact that CC said I had updated to the latest versions.  A thread in the LR forum led me to sign out and back into Creative Cloud, and that did the trick for LR.  However, I cannot discern any changes in PS.  How can I tell if I am using the latest version of PS?  When I click on About Photoshop, the popup says:
    TIA.

    that's the latest ps as of today.

  • I have downloaded adobe camera raw 8.7 . Closed all adobe programs . Reopen PS cc6 , it is still using  camera raw 8.2 . How can I get the updated plug in to become active ?

    I have downloaded adobe camera raw 8.7 . Closed all adobe programs . Reopen PS cc6 , it is still using  camera raw 8.2 . How can I get the updated plug in to become active ?

    Please clarify your version of Photoshop.
    There is no CC6.
    There is
    Photoshop CS6
    Photoshop CC
    Photoshop CC 2014
    Also, what is your operating system?

  • How can i know if my query is using the index ?

    Hello...
    How can i know if my query is using the index of the table or not?
    im using set autotrace on...but is there another way to do it?
    thanks!
    Alessandro Falanque.

    Hi,
    You can use Explain Plan for checking that your query is using proper index or not. First you need to check that Plan_table is installed in your database or not. If it is not there THEN THE SCRIPT WILL BE LIKE THIS:
    CREATE TABLE PLAN_TABLE (
    STATEMENT_ID VARCHAR2 (30),
    TIMESTAMP DATE,
    REMARKS VARCHAR2 (80),
    OPERATION VARCHAR2 (30),
    OPTIONS VARCHAR2 (30),
    OBJECT_NODE VARCHAR2 (128),
    OBJECT_OWNER VARCHAR2 (30),
    OBJECT_NAME VARCHAR2 (30),
    OBJECT_INSTANCE NUMBER,
    OBJECT_TYPE VARCHAR2 (30),
    OPTIMIZER VARCHAR2 (255),
    SEARCH_COLUMNS NUMBER,
    ID NUMBER,
    PARENT_ID NUMBER,
    POSITION NUMBER,
    COST NUMBER,
    CARDINALITY NUMBER,
    BYTES NUMBER,
    OTHER_TAG VARCHAR2 (255),
    PARTITION_START VARCHAR2 (255),
    PARTITION_STOP VARCHAR2 (255),
    PARTITION_ID NUMBER,
    OTHER LONG,
    DISTRIBUTION VARCHAR2 (30))
    TABLESPACE SYSTEM NOLOGGING
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 10240
    NEXT 10240
    PCTINCREASE 50
    MINEXTENTS 1
    MAXEXTENTS 121
    FREELISTS 1 FREELIST GROUPS 1 )
    NOCACHE;
    After that write the following command in the SQL prompt.
    Explain plan for (Select statement);
    Select level, SubStr( lpad(' ',2*(Level-1)) || operation || ' ' ||
    object_name || ' ' || options || ' ' ||
    decode(id, null , ' ', decode(position, null,' ', 'Cost = ' || position) ),1,100)
    || ' ' || nvl(other_tag, ' ') Operation
    from PLAN_TABLE
    start with id = 0
    connect by
    prior id = parent_id;
    This will show how the query is getting executed . What are all the indexes it is using etc.
    Cheers.
    Samujjwal Basu

  • How / can I have jpg logo objects used on reports automatically updated

    How / can I have jpg logo objects used on reports automatically updated after making changes to the repository copy of the jpg logo object in the repository?   The reports are in the enterprise items folder of the repository and the logo.jpg file is in a subfolder of repository items.  I made changes but the changes seem to apply only after I set my options in crystal reports and open the actual rpt file itself. 
    Is there a way to have the changes to the logo show / apply in all reports that have the repository item logo inserted into it without having to open every rpt file in the repository?

    Yes, I understand that...  the problem I was having was that check box being unchecked whenever an unrelated change was made to rpt file...  I was able to ensure that it remained checked by doing save as to the rpt file and making sure the "enable repository refresh" box was checked and replacing the file when prompted upons saving the rpt file...

  • How can we do policy updations and insertion using procedures in insurence?

    how can we do policy updations and insertion using procedures in insurence?
    please answer for this post i need faced in interview.how can we write the code for that procedure in policy details using procedures in plsql.

    997995 wrote:
    how can we do policy updations and insertion using procedures in insurence?
    please answer for this post i need faced in interview.how can we write the code for that procedure in policy details using procedures in plsql.You are asking about a specific business area (Insurance) and the nuances of that business (Insurance Policies) and providing no technical details about what is required, on a technical forum. There are many varied businesses in the world and not everyone here is going to be familiar with the area of business you are referring to.
    As a technical forum, people are here to assist with technical issues, not to try and help you answer questions in an interview for something you clearly know nothing about, so that you can get a job that you won't know how to do.
    If you have a specific technical issue, post appropriate details, including database version, table structures and indexes, example data and expected output etc. as detailed in the FAQ: {message:id=9360002}

  • HT201250 Hi, I had updated folder on my hard drive wich was wrongly replaced with a folder from my external drive. I m not using time machine. How can i recover that updated folder? (it was done on 3-5-12)

    Hi, I had updated folder on my hard drive wich was wrongly replaced with a folder from my external drive. I m not using time machine. How can i recover that updated folder? (it was done on 3-5-12)

    If the folder was replaced, it was written over.
    Nothing short of forensic data recovery (probably involving taking the drive apart to scan the discs seperately) is going to recover anything (if indeed even that will).

  • How to find out if your query uses the indexes?

    How can one tell if the query being issued is using your indexes or doing full table scans?
    Thank you.

    Thank you.
    Ok, let me see if I understand it. So, having an
    index may not speed things up.True
    Full table scans are not bad at all -- as I have it
    in my head. The query I ran before was: select *
    from table1;In that case an index would only slow things down; you are asking it to get all the information from the table - it has to read all of the table ( a full scan).
    >
    So full table scans and index have to do with the db
    block size and the size of the row correct?
    Block size and row size don't have a huge amount to do with it, but they do play a role.
    Let me ask: How does one know the size of a row and
    then the best option for the db blocks? Block size is a global setting (at the tablespace level I think). You would not likely change the block size based on the average row length in any one table. It would be about the last thing you might look at in terms of tuning (though you might consider it up-front if you had a huge amount of very predictable data).
    >
    And if, I create indexes and queries have the where
    clause and the database uses full table scans then
    does it means that either:
    The database believes that the best execution plan is
    to either do FULL SCANS OR USE INDEXES -- ALL UPTO
    THE DATABASE?
    No. There is another piece of information that the database needs to make good decisions. If for example you have a WHERE clause "WHERE not_paid = 1" and you have an index on not_paid. To make a good decision the database needs to know about how many of the rows are likely to be not_paid =1. If it's 90% then a full table scan will be cheaper than looking up the addresses of 90% of the rows and then getting the data. If it's 10% using the index will be cheaper. You need to use Analyze Tables to get the database to store this information. Looks like you need to use a bit of time with the manuals.
    Jon
    -J

  • How Can I make the following query faster

    Hi Guru
    I want your valuable suggestion to make the following query faster.I did not write all required columns list. I gave here all those columns where I have conditon like decode,case when,or subquery
    (SELECT CASE WHEN REPORTED_BY IS NULL THEN
              (SELECT INITCAP(EMP_NAME) FROM HR_EMP WHERE EMP_NO = M.EMP_NO_RADIO)
         ELSE (SELECT INITCAP(EMP_NAME) FROM HR_EMP WHERE EMP_NO = M.REPORTED_BY) END RADIOLOGIST_NAME,
         (SELECT TEAM_NAME FROM DC_TECHTEAMMST WHERE TEAM_NO = M.GROUP_NO) GROUP_NAME,
         CASE WHEN M.RESULT_ENTRY_LOCK_BY IS NOT NULL THEN 'R'
    WHEN M.REPORT_DONE = 'D' THEN 'D'
    WHEN M.REPORT_DONE = 'P' THEN 'P'
    WHEN M.REPORT_DONE = 'F' THEN 'F'
         WHEN NVL(M.IMG_CAPTURED,'X') NOT IN ('B','Y') OR M.QA_RESULT = 'F' THEN 'S'
    WHEN NVL(M.IMG_CAPTURED,'X') IN ('B','Y') AND NVL(M.QA_RESULT,'X') NOT IN ('B','P') THEN 'Q'
         wHEN NVL(M.IMG_CAPTURED,'X') IN ('B','Y') AND NVL(M.QA_RESULT,'X') IN ('B','P') THEN 'C'
    END STATUS,
         (SELECT DECODE(NVL(V.DELIVERY_STATUS,'N'),'E',3,'U',2,1)
              FROM FN_VOUCHERCHD V WHERE V.VOUCHER_NO = M.VOUCHER_NO AND V.ITEM_NO = M.TEST_NO) DELIVERY_STATUS,
         trunc((start_time-order_end)*24,0)||' hr'||':'||
         decode(length(trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0)),2,to_char(trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0))
              ,1,to_char('0'||trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0)))||' mi' duration_order_capture,
         DECODE(R.CONFIDENTIAL_PATIENT,'Y','*',NVL(R.NAME,R.name_lang_name||' '||R.name_lang_fname)) PAT_NAME,
         FNC_PATIENTAGE(R.REG_NO,'',R.CONFIDENTIAL_PATIENT) pat_age,
         DECODE(R.CONFIDENTIAL_PATIENT,'Y','*',R.PATIENT_SEX) PAT_SEX
    FROM DC_MODALITYAPPOINTMENT M,DC_TESTMST T,OP_REGISTRATION R
    WHERE M.ACCESSION_NO IS NOT NULL AND NVL(M.CANCEL_FLAG,'N') = 'N'
    AND (NVL(T.SP_GEN,'S') = 'S' OR NVL(M.DOC_REQ_GEN,'N') = 'Y')
    AND M.TEST_NO IS NOT NULL AND M.TEST_NO = T.TEST_NO AND M.REG_NO = R.REG_NO)
    How can I make the above query faster.
    Query condition or indexing whatever is preferable please guide me.
    The approximate data of tables
    DC_MODALITYAPPOINTMENT 2,000,000
    A lot of updating is going on some columns of this table.all columns are not in the select list, Insertion is happend in batch process by back-end trigger of another table.
    Primary key based one column,
    OP_REGISTRATION 500,000
    Daily insertion on this table around 500 records,updation is not much.
    Primary key based one column 'reg_no'
    DC_TESTMST
    Total records of this table not more than 1500.This is setup table. Insertion and updation is not much on this table also
    I have to create a view based on this query .
    and I have to create another view to serve another purpose.
    In the 2nd view I need this query as well as I need another query by using union all operator based on a table(dc_oldresult)
    which have 1,600,000 records.There is no DML on this table
    SELECT      NVL((SELECT USER_DEFINE_TEST_NO FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1 ),SV_ID) USER_D_EXAM_NO,
    (SELECT TEST_TYPE FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1 ) EXAM_TYPE,
         NVL((SELECT TEST_NAME FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1),'Exam Code: '||sv_id) EXAM_NAME,
         (SELECT PAT_NAME FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_NAME,
         (SELECT PAT_AGE FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_AGE,
         (SELECT PAT_SEX FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_GENDER
    FROM DC_OLDRESULT
    WHERE HN IS NOT NULL AND SV_ID IS NOT NULL AND UPPER(ACTIVE) = 'TRUE'
    Should I make join DC_OLDRESULT, OP_REGISTRATION and DC_TESTMST? or The eixisting subquery is better?
    I use OP_REGISTRATION and DC_TESTMST in both query
    Thanks in advance
    Mokarem

    When your query takes too long ...

  • How can you keep your iPhone 4 (using it as my car's iPod) staying on the Audible app?  When I leave the car and return to continue hearing a book, it has switched to iTunes.

    How can you keep your iPhone 4 (using it as my car's iPod) staying on the Audible app?  When I leave the car and return to continue hearing a book, it has switched to iTunes.

    The first time an iPhone is connected to iTunes that is used to sync with another iPhone or iOS device, you are prompted to transfer the backup for the other iPhone or iOS device or to set up the iPhone as a new iPhone.
    The former does as provided - it transfers the backup for the other iPhone or iOS device to the iPhone replacing all data on the iPhone that is included with the backup being transferred. The latter does nothing allowing you to make your various selections for the iPhone sync preferences with iTunes.
    This is designed to be done right away with a new iPhone.
    If you don't have a backup for the iPhone with iTunes on your computer and don't have an iCloud backup that hasn't been updated since choosing to transfer the backup for your iPod Touch to the iPhone, the data that was on the iPhone is gone.

  • In DBI , how to find out the Source Query used for the Report

    Hi All,
    How to find out the Source Query used to display the data in the DBI Reports or Dashboards. We can get it in Apps Front end by Going to Help and Record Histroty. But DBI Runs in Internet Explorer so i dont know how to get the source query ( SELECT Query ) Used.
    In IE we have View --> Source . But that does not help since it gives the HTML Coding and not the SELECT Query used.
    If anyone has ever worked on it...Please help me in finding it.
    Thanks,
    Neeraj Shrivastava

    Hi neeraj,
    You can see the query used to display reports.Follow these steps to get the query.
    1)Login to oracle apps
    2)Select "Daily Business Intelligence Administrator" responsiblity.
    3)Now click on "Enable/Disable Debugging" (Now u enabled debugging)
    4)now open the report which you want to see the query of
    5)In view source it displays query along with the bind varilables.
    Feel free to ping me if you have any doubts
    thanks
    kittu

Maybe you are looking for

  • Locating Oracle Forms Error Messages File to Load into Table

    I would like to create a procedure to suppress and replace Form errors and messages via ON-ERROR and ON-MESSAGE triggers. Is there a file that I can load the ERROR Messages from using SQLLDR? I have loaded the Oracle error file, $ORACLE_HOME/rdbms/me

  • Moving SAP Database into another Hardisk

    Hi Expert I want to move all WG55 database into another free space hardisk under MMSQL 2000 enterprise edition , I have 3 database to move on Eg R:\WG55DATA1,WG55DATA2,WG55DATA3 and K:\tempdb.mdf All the above database are in D:\WG55DATA1,WG55DATA2,W

  • Change Manager and Person Responsible

    Why the Change Manager partner function is defined with function category "Person Responsible" and the CRM relationship "is responsible BP for"? This is related to the "Person responsible" field of a change document in the transaction crmd_order, whe

  • Invalid Credentials

    Hi LDAP Gurus, I'm a novice in LDAP and JNDI.i installed OPENLDAP on my linux system and its working fine but when i try the example of JNDI, it is giving me the error of INVALID_CREDENTIALS. The Error is : javax.naming.AuthenticationException: [LDAP

  • ITunes play count

    I'm wondering if there is a way to get the play-count of songs in iTunes just for a specific week? I don't want to reset my total play counts every week, but I also keep statistics about which songs I listen to every week. Hence, it would be highly u