Why don't XMLIndex not used in slow queries against an XMLType Table?

We have a slow queries based on XML with the help of XMLTable shown here running on 11 g Rel 2 (11.2.0.1) - basis for SUNOS:

select xcust.eid, xmi.ami, xmi.memberNum, xmi.accountNum
from CROUTREACH.acme_cust cust,
   XMLTable( XMLNAMESPACES(default 'http://www.cigna.com/acme/domains/customer/customerprofile/2011/11'),
       '$doc/customerProfile'
        passing cust.object_value as "doc"
        columns 
           eid varchar2(50) path '@eid'
   ) xcust,
   XMLTable(XMLNAMESPACES(default 'http://www.cigna.com/acme/domains/customer/customerprofile/2011/11'),
       'for $i in /customerProfile/memberInfos/memberInfo return $i'
        passing cust.object_value
        columns
           ami varchar2(15) path 'ami',
           memberNum varchar(20) path 'clientRelationship/memberNum',
           accountNum varchar(20) path 'clientRelationship/accountNum'
  ) xmi
*where xmi.accountNum = '3174016'*
*and xmi.memberNum = '07646258301'*
The development team noted:

"It worked for a while (minutes)." I'm not familiar with indexing on XML tables, but if we can somehow index by Member num/acct num (even temporarily), I think that it would speed up the process considerably. »

We have team added Oracle DBA fields num num/acct members to this xmlindex to recreate:
CREATE INDEX ACME_CUST_XMLINDEX_IX ON ACME_CUST (OBJECT_VALUE) 
      INDEXTYPE IS XDB.XMLINDEX  PARAMETERS ('XMLTABLE ACME_CUST_IDX_TAB 
         XMLNamespaces (''http://www.cigna.com/acme/domains/commoncontact/2011/11'' as "cm",
             default ''http://www.cigna.com/acme/domains/customer/customerprofile/2011/11''),
         ''/customerProfile'' 
        columns
           DOB date  PATH ''personInformation/cm:birthDate'',
           FIRSTNAME varchar2(40)    PATH ''name/cm:givenName'',
           LASTNAME varchar2(40)  PATH ''name/cm:surName'', 
           SSN varchar2(30) PATH ''identifiers/ssn'',
           MEMBERINFOS XMLType path ''memberInfos/memberInfo'' VIRTUAL 

       XMLTable acme_cust_lev2_idx_tab 
       XMLNAMESPACES(default ''http://www.cigna.com/acme/domains/customer/customerprofile/2011/11''),
       ''/memberInfo'' passing MEMBERINFOS 
       columns 
          ami varchar2(40) PATH ''ami'',
          subscId varchar2(50) PATH ''clientRelationship/subscriberInformation/subscriberId'', 
          employeeId varchar2(50) PATH ''systemKeys/employeeId'', 
          clientId varchar2(50) PATH ''clientRelationship/clientId'',
          *accountNum varchar2(50) PATH ''clientRelationship/accountNum''*,
          *memberNum varchar2(50) PATH ''clientRelationship/memberNum'''*) PARALLEL 16;
Unfortunately, when we run the query XML is slow; a full table scan occurs on the query and the xmlindex do not get used.
We are at a lost as to why the xmlindex serves not - before and after collecting pass them on the underlying table for the ACME_CUST?
Especially with highly selective predicates in the WHERE clause.


Here is the definition of table ACME_CUST:
CREATE TABLE "CROUTREACH"."ACME_CUST" OF XMLTYPE
  (
    CONSTRAINT "ACME_CUST_ID_PK" PRIMARY KEY ("ACME_CUST_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
  (
    "EID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/customer/customerprofile/2011/11"; (::)                               
/customerProfile/@eid'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(15))),
    "ACME_CUST_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
    'declare default element namespace "http://www.cigna.com/acme/domains/customer/customerprofile/2011/11"; (::)                               
/customerProfile/@id'
    PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
    16777216,0),50,1,2) AS VARCHAR2(50))),
    "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/customer/customerprofile/2011/11"; (::)                                                                                                       
/customerProfile/@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)))
  )
  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" ;
Any help on this is much appreciated to say the least!

Kind regards
Rick Blanchard

Could you post an explain plan?

Tags: Database

Similar Questions

  • Why color Temp does not use theory standard blackbody in lightroom?

    Hi all, I would like to ask a question. Why the temperature in Lightroom does not use theory standard blue witch bsigns black body for higher values and the red ones for lower values on the kelvin color temperature scale?

    I'm not a novice and a motion graphic designer and 3D generalist and I do not understand why the Lightrooms does not use the normal scale. You go to a 3D ap and if you are familiar with lightroom you will have some problems whit lighthning because in all the 3d points and from what I've seen other counters aps use the kelvin color temperature values, higher values are asigned to blue spectrum. For example, with a bulb (D65) of natural light has a value of 2700 Kelvin is the red color red but in lightroom is on the opposite side and 2700 you have a tint of blue. I personally find very annoing this approach and I would like to ask Adobe if they could put an option to change the color temperature scale Kelvin standard.

    Thank you

    http://en.Wikipedia.org/wiki/Color_temperature

    Cursors do not set the light black body temperature, but compensation requested the image to compensate for the temperature of the black body of light.  This is going the other way.

    If a picture is taken in tungsten (light that is yellow-ish), we always want to look white 'white' when view us on a screen (as our eyes compensate for the color temperature of the ambient lighting).  To adjust to the lighting low temp black body (i.e. yellow-ish), so we want to make the image more blue, so it does not yellow.  Until the lower part of the blackbody temp lighting (i.e. more yellow enlightenment), the more blue the compensation that we must apply.

  • Why xmlindex is not used in the slow queries on xml binary table eval?

    I run a slow simple query on Oracle 11.2.0.1 database server that does not use a xmlindex. Instead, a full table scan against the table eval binary xml occurs. This is the query:
     select -- /*+ NO_XMLINDEX_REWRITE no_parallel(eval)*/
          defid from eval,
          XMLTable(XMLNAMESPACES(DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
          'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7"),
          '$doc/eval/derivedFacts/ns7:derivedFact' passing eval.object_value as "doc" columns defid varchar2(100) path 'ns7:defId'
           ) eval_xml
    where eval_xml.defid in ('59543','55208'); 
    The predicate is not selective at all - the number of rows returned is the same as the number of rows in table (325 550 in the eval table xml documents). When different values are used, which brings the number of lines down to ~ 33%, the xmlindex still is not used - as is expected in a purely relational XML environment.

    My question is why would'nt the xmlindex be used somehow full scan compared to a sweep of full table that cross the xml for each record in paper table eval?
    FFS suspicion would apply to a field of type xmlindex index?

    Here is the definition of xmlindex:
     CREATE INDEX "EVAL_XMLINDEX_IX" ON "EVAL" (OBJECT_VALUE)
      INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
      ('XMLTable eval_idx_tab XMLNamespaces(DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03'',
      ''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7"),''/eval'' 
           COLUMNS defId VARCHAR2(100) path ''/derivedFacts/ns7:derivedFact/ns7:defId''');
    Here is the definition of table eval:
     CREATE
      TABLE "N98991"."EVAL" OF XMLTYPE
      (
        CONSTRAINT "EVAL_ID_PK" PRIMARY KEY ("EVAL_ID") USING INDEX PCTFREE 10
        INITRANS 4 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 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
      (
        "EVAL_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/eval/2010/03"; (::)
    /eval/@eval_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))),
        "EVAL_CAT" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@category'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "ACME_MBR_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "EVAL_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@evalId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      )
      PCTFREE 0 PCTUSED 80 INITRANS 4 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" ; 
    Purified sample extract of XML:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><eval createdById="xxxx" hhhhMemberId="37e6f05a-88dc-41e9-a8df-2a2ac6d822c9" category="eeeeeeee" eval_dt="2012-02-11T23:47:02.645Z" evalId="12e007f5-b7c3-4da2-b8b8-4bf066675d1a" xmlns="http://www.xxxxx.com/vvvv/domains/eval/2010/03" xmlns:ns2="http://www.cigna.com/nnnn/domains/derived/fact/2010/03" xmlns:ns3="http://www.xxxxx.com/vvvv/domains/common/2010/03">
       <derivedFacts>
          <ns2:derivedFact>
             <ns2:defId>12345</ns2:defId>
             <ns2:defUrn>urn:mmmmrunner:Medical:Definition:DerivedFact:52657:1</ns2:defUrn>
             <ns2:factSource>tttt Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>boolean</ns2:type>
                <ns2:value>true</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>52600</ns2:defId>
             <ns2:defUrn>urn:ddddrunner:Medical:Definition:DerivedFact:52600:2</ns2:defUrn>
             <ns2:factSource>cccc Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>null</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>59543</ns2:defId>
             <ns2:defUrn>urn:ddddunner:Medical:Definition:DerivedFact:52599:1</ns2:defUrn>
             <ns2:factSource>dddd Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>INT</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
                    ...
                With the repeating <ns2:derivedFact> element continuing under the <derivedFacts>
    Oracle XML DB 11g Release 2 Developer's Guide is not much help...

    Any help is appreciated.

    Kind regards
    Rick Blanchard

    XMLIndex definition is not correct, for the following reasons:

    In the COLUMNS clause, the path expression is compared to the context from the main event of XQuery item (HERE "/ eval").
    If you use an initial slash as you did, this indicates that the context item is an element of "derivedFacts" (which is not correct since it is an "eval" element).
    Therefore, the path points to no existing node:

    derivedFact XMLTYPE path ''/derivedFacts/ns7:derivedFact'' virtual
    

    There is a mismatch between the statements of prefix ns7, probably a typing mistake?

    ''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7"
    ...
    ''http://www.cigna.com/acme/domains/derived/FACT/2010/03'' AS "ns7"
    

    What "eval_xml" is referring to here?

    passing eval_xml.derivedFact
    

    The path to "defId" don't go too:

    defId VARCHAR2(100) path ''/derivedFacts/ns7:derivedFact/ns7:defId''
    

    Try this one, it should help you to:

    CREATE INDEX "EVAL_XMLINDEX_IX" ON "EVAL" (OBJECT_VALUE)
    INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS (
    'XMLTable eval_idx_tab_I
      XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",
                    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),
      ''/eval''
      COLUMNS
       eval_catt   VARCHAR2(50) path ''@category'',
       derivedFact XMLTYPE      path ''derivedFacts/ns7:derivedFact'' virtual
     XMLTable eval_idx_tab_II
      XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",
                    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),
      ''/ns7:derivedFact'' passing derivedFact
      COLUMNS
       defId VARCHAR2(100) path ''ns7:defId'''
    );
    
  • Why don't twist not the home screen display Zoom mode on my 6?

    Why don't the home screen display Zoom mode on my iPhone not twist 6 more iOS 9.3.5?

    Hello, brichter!

    Thank you for joining the communities Support from Apple! Looks like you're wanting to rotate the Zoom mode on your iPhone screen. It is a big question. Read this post here that talks about how make a use display Zoom on your iPhone 6 and later versions. As you can see here:

    With the Zoomed see on an iPhone 6 or 6 s, iPhone Home screen does not rotate landscapemode.

    It is a behaviour whereas you experience when you use the display Zoom.

    See you soon!

  • FBI and XMLINDEX not use by the optimizer

    Hello

    I've created a function based index but optimizer is never using my index and found for BINARYXML FBI is not suggested rather THAN XMLINDEX is good, it seems does not work for me, but even.

    I tried to use tips but doesn't help me at all. Any suggestions would be really useful.

    SQL > show parameter index

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    optimizer_index_caching integer 0
    OPTIMIZER_INDEX_COST_ADJ integer 1
    optimizer_use_invisible_indexes boolean FALSE
    skip_unusable_indexes Boolean TRUE
    SQL >

    SQL > desc FXXX_SEC_POS_FB
    Name                                                                                  Null?    Type
    ------------------------------------------------------------------------------------- -------- ----------------------------------------------------------
    RECID A NOT NULL VARCHAR2 (255)
    XMLRECORD                                                                                      SYS. XMLTYPE BINARY STORAGE

    SQL >

    SQL * more: Production release 11.2.0.4.0 Wed Feb 11 06:34:39 2015

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    INDEX_NAME INDEX_TYPE VISIBILITY FUNCIDX_ DOMIDX_MANAGEM
    ------------------------------ --------------------------- --------- -------- --------------
    SYS_IL0000174507C00003$ $ LOB VISIBLE
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C2
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C81

    SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists ("$xmlrecvar/row [c81/text () ="US0010001"]' by the WAY ')

    XMLRECORD AS 'xmlrecvar')

    The higher the SQL statement execution Plan:

    Hash value of plan: 4259655978

    --------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    --------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |   1.  SEMI NESTED LOOPS.                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |*  2 |   TABLE ACCESS FULL | FBNK_SEC_POS_FB |  4427 |  9247K |  75786 (1) | 00:15:10 |
    |*  3 |   XPATH EVALUATION.                 |       |       |            |          |
    --------------------------------------------------------------------------------------

    Name of the query block / Alias object (identified by the operation identity card):
    -------------------------------------------------------------

    1 SALT$ BCF67709
    2 SALT$ BCF67709 / T@SEL$1

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - filter("SECURITY_NUMBER"='000566-000')
    3 - filter("P".") C_01$ "= 'US0010001')

    Projection of the column information (identified by the operation identity card):
    -----------------------------------------------------------

    1 (#keys = 0) "T". "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    2 - « T ». "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    3 VALUE (A0) [4000]

    Note
    -----
    -dynamic sample used for this survey (level = 2)
    LETTER: SQL: 2:Full: SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists (' $xmlrecvar/row [c81 / text ()])

    (= "US0010001"]' in PASSING XMLRECORD AS 'xmlrecvar')

    4096 selected records

    You probably won't see the difference in approach...

    I have NOT used and not STRUCTURED XML, but a STRUCTURED index rather XML index...

    • Index unstructured XML when introduced in 11.1 and use an ARRAY of path. Unstructured XML indexes are mainly used for research "blurred".
    • Structured XML indexes where introduced in 11.2 and make use of one or more TABLES of CONTENTS that contain, must contain content of the structured parts in the XML document

    So I have not used

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
    ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
    PARAMETERS ('  PATH TABLE IX_PATH_TABLE
                    PATHS (  INCLUDE ( /row/c2 /row/c81 ))'
                );
    

    but instead I used a XML structured, based on the function XMLTABLE index

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
      ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
      PARAMETERS (q'# GROUP SXI_GROUP
                      XMLTABLE SXI_CONTENT_TABLE
                      '/row'
                      COLUMNS
                        C2  VARCHAR2(100)     PATH 'c2'
                      , C81 VARCHAR2(100)     PATH 'c81'
                    #');
    

    On those, I also created EXTRA build secondary indexes on the columns of the TABLE CONTENT with the name 'SXI_CONTENT_TABLE '.

    create index SEC_FXXX_C2_FB on SXI_CONTENT_TABLE(C2);
    create index SEC_FXXX_C81_FB on SXI_CONTENT_TABLE(C81);
    create unique index SEC_FXXX_RIDC2C81_FB on SXI_CONTENT_TABLE(RID, C2, C81);
    

    ...

  • Structured XMLIndex not used by the query

    Hello

    We try to use XMLIndexes structured for a query. But they are not used. A sample of similar work is as follows:


    -Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Example of XML data on the XMLTYPE column is:

    <?xml version="1.0" encoding="UTF-8" standalone='yes'?>  
    <abc:tagOne preparationTime="2012-10-17T13:01:23.000Z" schemaVersion="1.3.9.0" xsi:schemaLocation="" xmlns:def="DEF" xmlns:abc="ABC"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  
        <def:tagTwo>  
            <def:tagThree id="Identity1">  
                <def:Section domain="Domain123">10000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity2">  
                <def:Section domain="Domain123">20000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity3">  
                <def:Section domain="Domain123">30000</def:Section>  
            </def:tagThree>  
            <def:tagThree id="Identity4">  
                <def:Section domain="Domain123">40000</def:Section>  
            </def:tagThree>  
        </def:tagTwo>  
    </abc:tagOne>
    
    
    
    
    



    Query is like:

    select  XMLAGG(XML_MESSAGE)  
        from INT_PART_TABLE  
        where XMLExists('  
            declare namespace abc="ABC";  
            declare namespace def="DEF";  
            $Message/abc:tagOne/def:tagTwo/def:tagThree[@id="Identity4"][def:Section[@domain="Domain123"]  = ("50000", "40000") ]'  
            passing  
            xML_mESSAGE as "Message"  
        )
    
    
    
    
    


    We try to create indexes structured on the column of xmltype, as defined in the XML example file:

    CREATE INDEX INT_PART_TABLE_SXI
       ON INT_PART_TABLE (XML_MESSAGE)
       INDEXTYPE IS XDB.XMLINDEX
          PARAMETERS ('XMLTABLE INT_PART_content_table_01
                               XMLNAMESPACES (''ABC'' AS "abc",
                                              ''DEF'' AS "def"),  
                               ''/abc:tagOne/def:tagTwo''
                       COLUMNS
                         xmltagTwo      XMLTYPE  PATH ''/abc:tagOne/def:tagTwo''  VIRTUAL
                       XMLTABLE INT_PART_content_table_02
                         XMLNAMESPACES (''DEF'' AS "def"),
                         ''/def:tagTwo''
                                PASSING xmltagTwo
                                 COLUMNS 
                                 xmltagThree     XMLTYPE  PATH ''/def:tagThree''   VIRTUAL
                       XMLTABLE INT_PART_content_table_03
                          XMLNAMESPACES (''DEF'' AS "def"),    
                          ''/def:tagThree''
                             PASSING xmltagThree
                               COLUMNS 
                               section number PATH ''def:Section'',
                               domain varchar2(20) PATH ''@domain'',
                               id varchar2(20) PATH ''@id''
                  ')local;
    
    
    
    
    

    Table structure:

    CREATE TABLE INT_PART_TABLE
    (
       DB_ID            VARCHAR2 (10 BYTE),
       xML_mESSAGE      SYS.XMLTYPE,
       LOAD_TIMESTAMP   TIMESTAMP (6)
    )
    XMLTYPE xML_mESSAGE
       STORE AS BINARY XML
       (ENABLE STORAGE IN ROW
        CHUNK 16384
        RETENTION
        CACHE READS NOLOGGING)
       ALLOW NONSCHEMA
       DISALLOW ANYSCHEMA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (BUFFER_POOL DEFAULT)
    PARTITION BY RANGE (LOAD_TIMESTAMP)
       (PARTITION P_12092012 VALUES LESS THAN (TIMESTAMP ' 2012-09-12 00:00:00')
           LOGGING
           NOCOMPRESS
           PCTFREE 10
           INITRANS 1
           MAXTRANS 255
           STORAGE (INITIAL 512 K
                    NEXT 512 K
                    MINEXTENTS 1
                    MAXEXTENTS UNLIMITED
                    PCTINCREASE 0
                    BUFFER_POOL DEFAULT),
        PARTITION MAX VALUES LESS THAN (MAXVALUE)
           LOGGING
           NOCOMPRESS
           PCTFREE 10
           INITRANS 2
           MAXTRANS 255
           STORAGE (INITIAL 128 K
                    NEXT 128 K
                    MINEXTENTS 1
                    MAXEXTENTS UNLIMITED
                    PCTINCREASE 0
                    BUFFER_POOL DEFAULT))
    PARALLEL (DEGREE 8 INSTANCES 1);
    
    
    
    
    

    - But the query above does not use the XMLINDEX STRUCTURE and instead turns to FTS INT_PART_TABLE.  Please help here.

    Is it the wrong way I created structured Index.

    (I tried a few other ways where I got-> ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element).

    S ' Please NOTE that I used two "VIRTUAL" during the creation of the Index as otherwise I was getting the error:
    ORA-29958: fatal error occurred in the execution of routine ODCIINDEXCREATE
    ORA-30984: the XMLType column must be declared as virtual

    Please suggest. Thank you.

    Finally some time to watch this...

    The following works for me:

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL > create table (int_part_table)

    2 db_id varchar2 (10 byte)

    3, xml_message xmltype

    4, load_timestamp timestamp (6)

    5)

    store xml_message 6 xmltype to the binary xml format

    7 partition by range (load_timestamp)

    () 8

    9 lower values p_12092012 partition to (to_timestamp ('2012-09-12 00:00:00 ',' YYYY-MM-DD HH24:MI:SS'))))

    10, partition p_max values less than (maxvalue)

    11)

    12 parallel (degree 8 instances 1);

    Table created.

    SQL > create index int_part_table_sxi on int_part_table (xml_message)

    2 indextype is xdb.xmlindex

    3 rooms

    4 parameters (q'~)

    5 XMLTABLE int_part_content_table_01

    6 XMLNAMESPACES ('ABC' AS 'abc', 'DEF' AS 'def'),

    7 ' / abc: Tallet / def:tagTwo / def:tagThree'

    8 COLUMNS

    9 article binary_double PATH 'def:Section '.

    10, area varchar2 (20) PATH 'def:Section/@domain '.

    11, id varchar2 (20) PATH '@id '.

    12 ~');

    The index is created.

    SQL >

    SQL >

    SQL > insert into int_part_table values)

    2 '1'

    3, xmltype (')

    4

    ' NS:ABC = 'ABC' xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" > ".

    5

    6

    7              10000

    8

    9

    10 20000

    11

    12

    13 30000

    14

    15

    16 40000

    17

    18

    19 ')

    20, systimestamp

    (21);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > exec dbms_stats.gather_table_stats (user, 'INT_PART_TABLE');

    PL/SQL procedure successfully completed.

    SQL >

    SQL >

    SQL > set autotrace traceonly explain

    SQL > set lines 200

    SQL > define pages 100

    SQL >

    SQL > select / * + no_parallel * / xml_message

    2 of int_part_table

    3 where (XMLExists)

    4 ' declare namespace abc = "ABC"; (::)

    5 declare def namespace = "DEF"; (::)

    /ABC:tagOne/def:tagTwo/def:tagThree[@ID="Identity4 6 '.

    7 and def:Section/@domain="Domain123.

    8 and (def:Section = 40000

    9 or def:Section = 50000)]"

    10 passage xml_message

    11        ) ;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3112612945

    ---------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                      | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    ---------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                           |     1.   417.    15 (0) | 00:00:01 |       |       |

    |   1.  SEMI NESTED LOOPS.                           |     1.   417.    15 (0) | 00:00:01 |       |       |

    |   2.   RANGE OF PARTITION ALL THE |                           |     1.   367.    14 (0) | 00:00:01 |     1.     2.

    |   3.    TABLE ACCESS FULL | INT_PART_TABLE |     1.   367.    14 (0) | 00:00:01 |     1.     2.

    |   4.   ITERATOR SYSTEM PARTITION.                           |     1.    50.     1 (0) | 00:00:01 |   KEY |   KEY |

    |*  5 |    TABLE ACCESS BY LOCAL INDEX ROWID | INT_PART_CONTENT_TABLE_01 |     1.    50.     1 (0) | 00:00:01 |   KEY |   KEY |

    |*  6 |     INDEX RANGE SCAN | SYS78560_78563_RID_IDX |     1.       |     0 (0) | 00:00:01 |   KEY |   KEY |

    ---------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - filter("SYS_SXI_0".") ID "="Identity4"AND ("SYS_SXI_0"". ")" SECTION "IS 4.0E + 004 D OR 'SYS_SXI_0'." SECTION "(= 5.0E + 004 D) AND"

    'SYS_SXI_0 '. ("DOMAIN"="Domain123")

    6 - access ("INT_PART_TABLE". ROWID = "SYS_SXI_0." ("' RID ')

    filter (TBL$ OR$ IDX$ PART$ NUM ("DEV".) "INT_PART_TABLE", 0,0,0, "INT_PART_TABLE". ROWID) TBL = $ OR$ IDX$ PART$ NUM ("DEV". "INT_PAR

    T_CONTENT_TABLE_01", 0,0,0,"SYS_SXI_0. " ROWID))

    A few things to know:

    -use BINARY_DOUBLE datatype to untyped (i.e. not based on a diagram) the numerical values of the XML index.

    -J' developed the sequence iterator predicate you were using for a Boolean expression GOLD. Otherwise, the index is not used as intended.

    You can also create a secondary index that satisfies the predicate #5 (see red part above):

    SQL > create index int_part_content_table_01_ix1

    2 on local int_part_content_table_01 (id, field, section);

    The index is created.

    SQL >

    SQL > select / * + no_parallel * / xml_message

    2 of int_part_table

    3 where (XMLExists)

    4 ' declare namespace abc = "ABC"; (::)

    5 declare def namespace = "DEF"; (::)

    /ABC:tagOne/def:tagTwo/def:tagThree[@ID="Identity4 6 '.

    7 and def:Section/@domain="Domain123.

    8 and (def:Section = 40000

    9 or def:Section = 50000)]"

    10 passage xml_message

    11        ) ;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3704965392

    --------------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                          | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |

    --------------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                               |     1.   417.     4 (25) | 00:00:01 |       |       |

    |   1.  NESTED LOOPS |                               |     1.   417.     4 (25) | 00:00:01 |       |       |

    |   2.   UNIQUE FATE |                               |     2.   100.     2 (0) | 00:00:01 |       |       |

    |   3.    SYSTEM PARTITION ALL |                               |     2.   100.     2 (0) | 00:00:01 |     1.     2.

    |   4.     TABLE ACCESS BY LOCAL INDEX ROWID | INT_PART_CONTENT_TABLE_01 |     2.   100.     2 (0) | 00:00:01 |     1.     2.

    |*  5 |      INDEX RANGE SCAN | INT_PART_CONTENT_TABLE_01_IX1 |     1.       |     1 (0) | 00:00:01 |     1.     2.

    |*  6 |   TABLE ACCESS BY ROWID USER | INT_PART_TABLE |     1.   367.     1 (0) | 00:00:01 | ROWID | ROWID |

    --------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    5 - access("SYS_SXI_0".") ID '= 'Identity4' AND 'SYS_SXI_0'." DOMAIN "=" Domain123 ")

    filter ("SYS_SXI_0". "SECTION"IS 4.0E + 004 D OR 'SYS_SXI_0'." SECTION "(= 5.0E + 004 D)"

    6 filter (TBL$ OR$ IDX$ PART$ NUM ("DEV".) "INT_PART_TABLE", 0,0,0, "INT_PART_TABLE". ROWID) TBL = $ OR$ IDX$ PART$ NUM ("DEV". "INT_PART_CON

    TENT_TABLE_01", 0,0,0,"SYS_SXI_0. " ROWID))

  • I tried to download CS4, but it will not download.  Says that I need to improve, but cannot do so unless I am owner CS1, 2 or 3.  Why don't I just use what I bought.

    I initially bought CS4 in 2009 but wiped out long and sold the computer that was on.  I tried to download CS4 on my current computer but he said setting up the version I have is the one that needs to be upgraded and to be eligible for the upgrade, that I need to have bought an eligible product (which I don't own) as CS 1, 2 or 3.  I can not just use the CS4 I bought initially?  Why should I buy something else to use what I bought?

    Hi Gina Kugler,.

    Make sure you download the suite CS4 or product that exactly matches what you had initially: Download Adobe Creative Suite 4 products. Serial numbers are for specific products.

    If you have done this, and you still receive the prompt for an eligible item, this means that your serial number CS4 is a upgrade product: error: "this serial number is not for a product calling it" | Adobe Creative Suite. If this is an upgrade and you installed before, it must have been an earlier qualifying version of CS on your old computer. Because none of the previous versions are installed on your new computer, however, a CS4 update will ask a qualifying serial number.

    If you are unsure if you already have a previous version of Creative Suite, you can check in your products & plans to sign in French - Adobe ID . You can also contact customer service. Click on the blue "Still need help?" button, and then select chat. Cat representatives are unable to provide troubleshooting techniques for older products such as CS4, but they can search for serial numbers, including under the alternate emails or phone numbers.

    Let us know if that helps.

    Best,

    Del

  • Why don't we not constantly update?

    We run a business on the internet very nice and let 5 computers work hard however we continue to be updated almost every week. It became a chore to use Firefox. When we started to use Firefox, years ago, that we could get an update 2 times a year, now it seems that 2 times a month. Please let us know why and if there is something we can do to change that. Update and unnecessary changes is very costly for our business and if she continues to make us perhaps change browsers. We love Firefox but updates must stop be so frequent. We do not have the time to update or do we not want any computer update unless someone watching him. We don't want automated updates. Update was the worst when you have made all of the unnecessary changes. It took me all day to all 5 computers to look alike so everyone can use anywhere they work. Please consider yourself a browser at the top of the page and not a fly by night. It is a professional company, so please act like him, walk like and this u-turn. I wonder if someone from Microsoft has begun to help you?

    New versions are released every 6 weeks for over 3 years now. There are several versions of "chemspill" both Firefox 32 and 33, since early September, to address the issues of security or because of the accident of bugs to a small part of the base installation.

  • Why VMware Player is not using AMD - V?

    I have the latest version of VMware Player (3.1.2 build-301548) and an AMD Athlon 64 X 2 Dual-Core Windsor (AMD - V compatible and active) and Windows 7 Ultimate 64-bit but VMware repeat myself that "this host does not support all hardware virtualization".

    Someone knows why?

    Thank you very much.

    Aedan says:

    So, my CPU is defective?

    Essentially.  There are some situations in which the first generation of AMD - V hardware is insufficient to completely accurate virtualization.

    It of bad, but can't I "force" VMware to use AMD - V still?

    You can not force VMware to use AMD - V.  Support for AMD - V on these chips fell.  You can use VMware Player 2.0, if you want to support AMD - V for your CPU, but I don't know why you would want it.  Without material assistance to MMU virtualization, AMD - V does not generally offer benefits of performance over binary translation.  See article ASPLOS for some comparisons.

  • Why "scratch disks" are not used in PS CC 2014

    When you change a major project which include several layers of images and smart objects, I often use up all available RAM. Just as 14FR is reached, I get a RAM error output and can not save (usually the smart update objects, it is what comes in the error)

    OK, I'm out of RAM. But I have set up a 400GO disk drive scratching in the preferences. Why is that not accessed in order to complete the operation?

    AdbeOper wrote:

    a Windows message comes up saying I need to close a program due to low memory.

    I see you have just 5 GB free on drive C. Seems to me the obvious and immediate problem. Especially since you have Photoshop for the allocation of memory all the way upward (which you should never).

    Remember that the OS does its own pagination — not only for other applications, but for a lot of process system running continuously in the background.

  • Why don't will not open Photoshop CS2 after installation.

    I got Creative Suite Premium installed on my laptop for years and not had any problems.  I installed it on my home office and activation has been accepted.  Other programs of the Suite work but Photoshop will only as far as the blue window and the hourglass just sits there.  I work with XP Pro and when I open the Photoshop Task Manager is presented as does not.  I tried to repair it with the installation disk and I tried to uninstall/reinstall twice but nothing seems to help.

    As I put the Suite on my laptop, the installation discs were on my book shelf.  What could possibly prevent opening Photoshop?

    Many thanks in advance,

    Jim Lynn

    What is shown in the blue like loading window when the thing freezes?

    Have you tried to reset your preferences, as described in the FAQ.

    http://forums.Adobe.com/thread/375776?TSTART=0

    You must physically delete (or rename) the preference files or, if you use the Alt, Ctrl, and shift, don't forget you get a confirmation dialog box.

    This resets all settings in Photoshop default.   A complete uninstall/reinstall will not affect preferences and a corrupted file may be the cause of the problem.

  • Why don't blgs not load correctly the first time

    Why are there several "refreshes" to properly load the pages for blogs?

    DNS prefetching

    Firefox tries to speed up loading new websites using DNS Prefetching, which can cause errors in loading page with some configurations of the system. To disable DNS prefetching:

       In the Location bar, type about:config and press Enter.
           The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page.
       Right-click in the list of preferences, select New, and then select Boolean.
       In the Enter the preference name window, enter network.dns.disablePrefetch and click OK.
       Select true when prompted to set the value and click OK.
    

    This work fine for me. blank page nor any stop refreshing just to get to a site.

  • Why BrowserField demo does not use BrowserField?

    I had some problems getting the BrowserField object to display all images on a page. When you search the formus, it was suggested to use the BrowserFieldDemo included in JDE for example. I tried and it works, but the back button does not work and you can not click on one of the links. Then I discovered that it does not actually use a BrowserField object as in

    net.rim.device.api.browser.field2.BrowserField
    

    Does anyone know how to make the browserField to work... WITH a functional back button and no image broken?

    I'd appreciate all point in the right direction.

    In fact, I realized that BrowserField demo uses OS 4.0 components while the BrowserField object is only OS 5.

  • Why some OCD is not used to generate the output?

    I use RoboHelp 11 on Windows 8.

    I use a print single source layout that uses a table of specific contents. However, when the output is generated the same set of topics are included, none of which are in the selected table of contents. I'm mystefied, and in the hope that there is something that I forgot to select Properties.

    Here's what I use.

    SSL_Problem.png

    And here is the created files:

    PrintedDocumentationOutput.png

    The TOC file is empty. The 'Expédition' file contains the contents of a subject who is not in the table of contents.

    Help?

    AHA. Found the answer in the article by Peter Grainge (printing problems). Thank you, Peter!

  • Why 6 Lightroom does not use my second screen? In the same LR 5 PC's.

    Is anyone having the same problem?

    Please check if you have selected these options in the screenshot.

    Kind regards

    ~ Mohit

Maybe you are looking for