Not used in the path of the directory

Hello
I tried to rewrite a query that is taking almost a minute and 25 seconds to run. The database version is 11.1.0.7.
The query is-
SELECT COUNT (1)
OF TAB1 p
WHERE p.ACODE = 24377
AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.) PKey = p.AKey)
AND NOT EXISTS (SELECT 1 FROM phs tab 3 where phs.) PKey = p.AKey)
AND p.rflag = 'Y ';

The table didn't initially have an index on p.ACODE. So, I created this index and set it to visible and set optimizer_use_invisible_indexes as TRUE. I put surveillance on this index too. Even though I created the index on the column ACODE, the path is not using it. Is someone can you please tell me why it is not used.
Here is the plan explain the sql stmt and the use of the index-

I changed the real table and columns-

SQL > SELECT COUNT (1)
TAB1 2 p
3 WHERE p.ACODE = 24377
4 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.) PKey = p.AKey)
5 AND NOT EXISTS (SELECT 1 FROM phs tab 3 where phs.) PKey = p.AKey)
6 AND p.rflag = 'Y ';

COUNT (1)
1

SQL > explain the plan for
2. SELECT COUNT (1)
TAB1 3 p
4 WHERE p.ACODE = 24377
5 AND NOT EXISTS (SELECT 1 FROM TAB2 ph where ph.) PKey = p.AKey)
6 AND NOT EXISTS (SELECT 1 FROM phs tab 3 where phs.) PKey = p.AKey)
7 AND p.rflag = 'Y ';

He explained.

Elapsed time: 00:00:00.02
SQL > @$ORACLE_HOME/rdbms/admin/utlxpls.sql

PLAN_TABLE_OUTPUT
Hash value of plan: 3942424611

ID name bytes (% CPU) cost delay lines

INSTRUCTION 1 87 214K (2) OF SELECTION 0 00:42:57
1 SORT TOTAL 1 87
* 2 ANTI-87 HASH JOIN 1 214 K (2) 00:42:57
* 3 ANTI 60 1 209K (2) HASH JOIN 00:41:56
* TABLE ACCESS FULL TAB1 1 32 209K (2) 4 00:41:55
5 INDEX FULL SCAN 29918 818K 53 (0) PK_TAB3 00:00:01
6 INDEX FULL SCAN PK_TAB2 3199 K 82 5059 M (1) 00:01:01


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

2 - access("PH".") "PKey" ="P" AKey")
3 - access("PHS".") "PKey" ="P" AKey")
4 filter (TO_NUMBER ("P". "ACODE") = 24377 AND 'P '. ("' rflag" = "Y")

20 selected lines.

Elapsed time: 00:00:00.03
SQL > select index_name, VISIBILITY of user_indexes where index-name = "IDX_TAB1_ACODE";

INDEX_NAME VISIBILITY
---------
IDX_TAB1_ACODE VISIBLE

Elapsed time: 00:00:00.01
SQL > show the visible parameter

VALUE OF TYPE NAME
-----------
optimizer_use_invisible_indexes Boolean TRUE
SQL >

SQL > SELECT v.index_name, v.table_name,.
v.Monitoring, v.used,
start_monitoring, end_monitoring
V $ object_usage v dba_indexes u
WHERE v.index_name = u.index_name
AND v.index_name = 'IDX_TAB1_ACODE ';

INDEX_NAME TABLE_NAME MY USE START_MONITORING END_MONITORING
------------------------------ --- ---
-------------------
TAB1 IDX_TAB1_ACODE NO YES NO 26/05/2010 14:13:41

Elapsed time: 00:00:00.10

Is someone can you please tell me why it is not used.

4 filter (TO_NUMBER ("P". "ACODE") = 24377 "

implement

WHERE p.ACODE = '24377'

Tags: Database

Similar Questions

  • I'm not able to merge the partition not used to the local disk partition

    I'm using windows xp service pack 3 and I have deleted my partitions from disk 2, but im not able to merge the partition not used to the local disk partition, what should I do?

     
    Original title: HELP ASAP!

    Hi Joseph.

    Suggestion of PML in the thread below, can be very useful.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-performance/how-do-i-merge-two-partitions-in-XP/d2a7fa28-b2dc-41F6-9cd3-2c2beb6c6865

  • Can I remove Logical columns that I will not use in the layer of presentation as the id or foreign key columns?

    Hello

    Can I remove Logical columns at the level of the business layer that I'm not going to use the layer of presentation as the ID or foreign key columns? It will not affect the relations to the business layer?

    Kind regards

    Nestor

    Hi Nestor,.

    It won't unless they are used as keys, columns sort order, the ID column or the likes. But you can leave them in the MDB layer and expose just in the presentation layer - just in case you need it later. It is not use all the resources or generate overhead. More: Developer of the RPD should be used to work with loads of columns

  • Document windows does not use all the available on new monitor display area

    Hello

    I have a new monitor - a Benq BL2711.

    I have set up as my secondary monitor on display in Windows 8.

    I can put Photoshop (CS6) on this screen and maximize the it, but there is a vast space not used in the document window, which is not used. I want to show a lot more of my images that I can currently, but the document window will not only fill all that screen real estate. A large part of it is lost.

    The panels occupy the right space to the bottom of the screen, but the window of the document (or the display area?) uses only 60% of the height of the screen.

    What is a limitation or do I have to configure something? (I have reset the workspace of photography).

    Thanks for any help

    Nick

    It is really a shot in the water, but it's the space used by the "timeline" Panel when it is open. Try to check in the menu window and close the bottle.

    Other that that, there are always some good old Reset preferences. Make sure you save the custom actions/brushes/presets and so forth first!

  • A way to show items that are not used in the sequence

    Hello world

    is there a way to display items that are not used in the sequence.

    in order not to forget the "rushes" in the Assembly?

    my best,

    Turn on the use Audio and video columns in the sandbox and then sort by those.

  • May not use all the available space in the data store

    Hello

    We have a HP DL580 G7 Server P410i raid controller with 8 x 1 TB HDD.

    I create a raid 1 with 2 hard drives (1 TB) and raid 5 with 6 hard drives (5 TB) and install ESXi 5.1 in the first data store (1 to).

    After installation when I tried to create the 5 TB data store, (ESXi detects and displays the space available 5 TB) it does use that almost 2.5 TB! and may not use all the space

    I also installed the ESXi 5.5 but still no luck.

    This Ko seems to apply to you: http://kb.vmware.com/kb/2006942

  • I want to insuscribe because I do not use of the applications. Thank you

    I want to insuscribe because I do not use of the applications. Thank you

    In order to cancel the order, please contact customer service

    You can use: http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

    For more information on cancellation: cancel your creative cloud membership

  • can I install PES 11 on two laptops that are not used in the same place?

    Can I install PES 11 on two laptops that are not used in the same place or at the same time?

    Yes, your license entitles you to two simultaneous activations.

  • 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))

  • 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'''
    );
    
  • FTPAdapter - name of the logical directory - file not moved to the directory of archives

    I created a simple ftp service to read the file from the incoming remote directory and archive it in a directory 'archive' by using logical directories. I have provided input and archiving directories. The process reads the file in the directory entry, but don't move archives directory. In the opmn logs I saw the following message

    File Adapter::Outbound > because the file could not be copied into the directory of archive specified, file: CUST__20081113002951.xml is copied to a directory to archive by default: /apps/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/fileftp/defaultArchive/

    I checked one) directory permission - this is the users ftp directory, so there all the rwxrxrx bits set - I even tried rwxrwxrwx, but same problem
    (b) there is enough space in the box of
    (c) I can manually move the files to the same user.

    Second, the files in the directories of archive by default are created as root. Do not know why. Our server is running as user 'oracle '.

    We are on 10.1.3.4

    no idea how to solve this?

    Published by: user9514124 on November 13, 2008 17:27

    Thanks for the suggestions people, I was able to solve the problem by including UseRemoteArchive = 'true' attribute in the WSDL of FTP adapter in the element. I guess I should be clear that I was trying to check in remotely on the FTP server.

    Thank you
    Sridhar

  • How to make a refund on an app that I bought by mistake I can not use in the United States

    I have Down loaded and bought an antenna app companion that can not be used in the United States for $2.99.  How can I get a refund

    Purchases are considered final, but you can try the page 'report a problem' to contact iTunes Support and see if they will refund or credit you: http://reportaproblem.apple.com

    Or you can try to contact iTunes support via this page: https://support.apple.com/contact or https://www.apple.com/emea/support/itunes/contact.html

  • XMLquery - contours do not used throughout the code, but only in the xml request selected

    Hello

    We use-> database Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit
    We have a part of our system of s/w works as:
    Drop table xml_tbl
    
    create table xml_tbl (
    xml_msg_id integer,
    xml_msg_text xmltype
    );
    
    insert into xml_tbl values(1, '<main xmlns:ns1="Abc:SET"><ns1:id>1</ns1:id></main>');
    insert into xml_tbl values(1, '<main xmlns:ns1="Abc:SET"><ns1:id>1</ns1:id></main>');
    insert into xml_tbl values(1, '<main xmlns:ns1="Abc:SET"><ns1:id>2</ns1:id></main>');
    commit;
    
    --Code
    
    DECLARE
       v_output   CLOB;
    
       FUNCTION fn_xmlquery (p_date IN DATE)
          RETURN XMLTYPE
       AS
          v_xmlout   XMLTYPE;
          v_query    CLOB
             := TO_CLOB (
                   'declare namespace ns1 = "Abc:SET"; fn:count($File_Data/main/ns1:id)');
       BEGIN
          SELECT XMLQUERY (v_query
                           PASSING t_tbl.xml AS "File_Data" RETURNING CONTENT)
            INTO v_xmlout
            FROM (SELECT XMLAGG (xml_msg_text) AS xml
                    FROM xml_tbl t
                   WHERE XMLEXISTS (
                            'declare namespace ns1 = "Abc:SET";  /main/ns1:id = ("1") '
                            PASSING xml_msg_text)) t_tbl;
    
          RETURN (v_xmlout);
       END fn_xmlquery;
    BEGIN
       v_output :=
          XMLType.getClobVal (fn_xmlquery (TO_DATE ('20121231', 'YYYYMMDD')));
       DBMS_OUTPUT.put_line (v_output);
    END;
    
    --Now if I try the outline on xml_tbl query as:
    
    drop outline o_name;
    
    CREATE OUTLINE o_name ON
    SELECT XMLAGG (xml_msg_text) AS xml
                    FROM xml_tbl t
                   WHERE XMLEXISTS (
                            'declare namespace ns1 = "Abc:SET";  /main/ns1:id = ("1") '
                            PASSING xml_msg_text);
    
    
    select * from dba_outlines;
    If we execute just this request again, contour O_Name is used as can be seen in:
    Select * from dba_outlines;
    It is used in the two schemas in DB, as we wish.

    But if we execute all the code above, it takes, to make all the xquery deals.
    O_Name OUTLINE is not used. Not even in the same pattern.
    You can try the above, in your machine to replicate.

    Please suggest how to do the work described in this case. As things do not work in our system at all because the query plan wrong by the above query on which we create the contour.
    Thank you...

    Published by: user8941550 on January 9, 2013 23:16

    Maybe the XQuery Modules will build in a future version of the database.

    So please can you suggest a better way we can use so that we can avoid the dynamic xquery thing.

    Make the dynamic SQL set instead, not only the request XQuery and run it via EXECUTE IMMEDIATE or DBMS_SQL.
    This way, the CBO know XQ expression to analyze the time and be able to optimize it.

    I'm not a big fan of this approach, but the lack of something better.

  • Model for PK not used on the tables of objects

    When uttering a primary key for a table of objects, the model for the primary key name is not used. SDDM (3.1.4 and earlier versions) is the addition of the string 'Oid_' before the name of the primary key table by default. So instead of "TABLE1_PK", the default name is "Oid_TABLE1_PK". It looks like the model is used by the object tables.

    ACE

    Hi Scott,.

    This should be fixed in version 3.3 of ai2 which is now available on OTN.

    David

Maybe you are looking for