Differences in behavior of XMLType storage

Hello

I have problem with the differences in behavior of type 'BINARY XML' of storage and cold storage (simple CLOB I guess) of the XMLType data type.

Setup

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

-XML file ("Receipt.xml") with a structure like:
<?xml version="1.0" encoding="UTF-8"?>
<ESBReceiptMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <ESBMessageHeader>
          <MsgSeqNumber>4713</MsgSeqNumber>
          <MessageType>Receipt</MessageType>
          <MessageVersion>1.1</MessageVersion>
     </ESBMessageHeader>
     <Receipt>
          <ReceiptKey>1234567-03</ReceiptKey>          
          <ReceiptLines>
               <ReceiptLine><Material><MaterialKey>00011-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
               <ReceiptLine><Material><MaterialKey>00021-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
               <ReceiptLine><Material><MaterialKey>00031-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
.....etc....etc.....etc...
               <ReceiptLine><Material><MaterialKey>09991-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
               <ReceiptLine><Material><MaterialKey>10001-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
               <ReceiptLine><Material><MaterialKey>10011-015-000</MaterialKey></Material><Qty>47.0</Qty></ReceiptLine>
          </ReceiptLines>
     </Receipt>
</ESBReceiptMessage>
= > header element 1: 'Réception' and 'ReceiptLine' items exactly 1001.

Problem:

Test 1:
drop table xml_ddb;
CREATE TABLE xml_ddb (id number,xml_doc XMLType);
INSERT INTO xml_ddb (id, xml_doc)  VALUES (4716,XMLType(bfilename('XMLDIR', 'Receipt.xml'),nls_charset_id('AL32UTF8')));

select count(1) from (
 SELECT dd.id,ta.Receiptkey,li.materialkey,li.qty
   FROM xml_ddb dd,
        XMLTable('/ESBReceiptMessage/Receipt' PASSING dd.xml_doc
                 COLUMNS ReceiptKey VARCHAR2(28) PATH 'ReceiptKey',
                         ReceiptLine XMLType PATH 'ReceiptLines/ReceiptLine') ta,
        XMLTable('ReceiptLine' PASSING ta.ReceiptLine
                 COLUMNS materialkey VARCHAR2(14)  PATH 'Material/MaterialKey',
                         qty         NUMBER(10)    PATH 'Qty') li
                          )
                          ;


  COUNT(1)
----------
      1001

1 row selected.
The storage of the XMLType column has not been specified.

= > All 1001 distinguish lines are selected.
= > All right

Test 2:
drop table xml_ddb;
CREATE TABLE xml_ddb (id number,xml_doc XMLType) XMLType xml_doc store AS BINARY XML; -- <---- Different storage type 
INSERT INTO xml_ddb (id, xml_doc)  VALUES (4716,XMLType(bfilename('XMLDIR', 'Receipt.xml'),nls_charset_id('AL32UTF8')));

select count(1) from (
 SELECT dd.id,ta.Receiptkey,li.materialkey,li.qty
   FROM xml_ddb dd,
        XMLTable('/ESBReceiptMessage/Receipt' PASSING dd.xml_doc
                 COLUMNS ReceiptKey VARCHAR2(28) PATH 'ReceiptKey',
                         ReceiptLine XMLType PATH 'ReceiptLines/ReceiptLine') ta,
        XMLTable('ReceiptLine' PASSING ta.ReceiptLine
                 COLUMNS materialkey VARCHAR2(14)  PATH 'Material/MaterialKey',
                         qty         NUMBER(10)    PATH 'Qty') li
                          )
                          ;


  COUNT(1)
----------
      1000

1 row selected.
Storage of XMLType column has been defined as "BINARY XML"

= > Only 1000 lines are select
= > A single line is missing.

After a few tests: there seems to be a "hard edge" of 1000 lines that comes with the different type of data (so if you put 2000 lines in the XML file, you will get also only 1000 rear lines)

Question

As I am a newbie in XMLDB:

-Is the "construction" with tables nested in the statement select-maybe not recommended / "allowed"?
-Are there ways to recover "Head" + "Line" of the elements in a relational structure (even if there are more than 1000 lines)?

Thanks in advance

Good bye

Stefan

The incorrect behavior on XML binary is probably due to bug 9194655. This problem has been fixed in 11.2.0.1.

Tags: Database

Similar Questions

  • Choose the XMLType storage option

    Hi all

    I work with an application that will be storing data using an XMLType column. The data being stored is a form with values for an arbitrary number of fields. We have an XSD that defines the different data types that can be stored. So in the document XML, type of the element node corresponds to the type of data stored and 'name' of the node attribute specifies the actual field recording. If a form which includes 2 text fields and 2 fields of type integer may have data like this:
    <dataset>
      <textField name="text_field1">Text Data Here</textField>
      <textField name="text_field2">More Text Data Here</textField>
      <integerField name="int_field1">1</integerField>
      <inteferField name="int_field2">2</integerField>
    </dataset>
    The application will dynamically generate SQL queries to query the different values. Given in each XML document can also be updated / inserted by the application (although this generally will be for one record at a time so the performance for the insert / update is not as much a concern as aggregation queries). In addition, the system is changing for a previous request and that the data stored in a relational way. There will very probably be queries that create relational views out of the column of Type XML.

    We currently have this implementation of object-relational storage. Does this sound correct? I can't say if we treat this as semi-structured storage instead. The scheme is well defined, but fields that are stored in each XML document are variable (so we know that data types ahead, just not the real fields). I would like to hear your comments on the type of storage that would be optimal. Any comment is appreciated...

    Here is the solution of GOLD

    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> VAR XMLSCHEMA CLOB
    SQL> VAR INSTANCE CLOB
    SQL> --
    SQL> begin
      2          :XMLSCHEMA :=
      3  '
      4          
      5                  
      6                          
      7                                  
      8                                          
      9                                  
     10                          
     11                  
     12          
     13          
     14                  
     15                          
     16                                  
     17                                          
     18                                  
     19                          
     20                  
     21          
     22          
     23                  
     24                          
     25                                  
     26                                  
     27                          
     28                  
     29          
     30  ';
     31    :INSTANCE :=
     32  '
     33       Test1
     34       Test2
     35       1
     36       2
     37  ';
     38  end;
     39  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    SQL> begin
      2    DBMS_XMLSCHEMA.registerSchema(
      3                     enablehierarchy  => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE ,
      4                     GENTYPES   => TRUE,
      5                     GENBEAN    => FALSE,
      6                     GENTABLES  => FALSE,
      7                     FORCE      => FALSE,
      8                     OWNER      => USER,
      9                     SCHEMAURL  => 'http://testurl.com/test.xsd',
     10                     SCHEMADOC  => XMLTYPE(:XMLSCHEMA)
     11                  );
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.44
    SQL> create table TEST_DATA (
      2    REC_ID                NUMBER  NOT NULL,
      3    REC_DATA          XMLTYPE
      4  )
      5  xmltype REC_DATA
      6  STORE AS OBJECT RELATIONAL
      7  XMLSCHEMA "http://testurl.com/test.xsd"
      8  ELEMENT "dataset"
      9  /
    
    Table created.
    
    Elapsed: 00:00:00.08
    SQL> set lines 80
    SQL> --
    SQL> desc TEST_DATA
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     REC_ID                                    NOT NULL NUMBER
     REC_DATA                                           SYS.XMLTYPE(XMLSchema "http:
                                                        //testurl.com/test.xsd" Elem
                                                        ent "dataset") STORAGE Objec
                                                        t-relational TYPE "dataset66
                                                        4_T"
    
    SQL> --
    SQL> begin
      2    DBMS_XMLSTORAGE_MANAGE.renameCollectionTable(USER,'TEST_DATA','REC_DATA','/dataset/textField','TEXT_FIELD_TABLE');
      3    DBMS_XMLSTORAGE_MANAGE.renameCollectionTable(USER,'TEST_DATA','REC_DATA','/dataset/integerField','INT_FIELD_TABLE');
      4  end;
      5  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:01.65
    SQL> column NAME format A32
    SQL> --
    SQL> set lines 80
    SQL> --
    SQL> desc TEXT_FIELD_TABLE
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     SYS_XDBPD$                                         XDB.XDB$RAW_LIST_T
     SYS_XDBBODY$                                       VARCHAR2(4000 CHAR)
     name                                               VARCHAR2(4000 CHAR)
    
    SQL> --
    SQL> desc INT_FIELD_TABLE
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     SYS_XDBPD$                                         XDB.XDB$RAW_LIST_T
     SYS_XDBBODY$                                       NUMBER(38)
     name                                               VARCHAR2(4000 CHAR)
    
    SQL> --
    SQL> create index TEXT_NAME_INDEX on TEXT_FIELD_TABLE("name")
      2  /
    
    Index created.
    
    Elapsed: 00:00:00.02
    SQL> create index INT_NAME_INDEX on INT_FIELD_TABLE("name")
      2  /
    
    Index created.
    
    Elapsed: 00:00:00.00
    SQL> set autotrace on explain
    SQL> set lines 150 pages 100
    SQL> --
    SQL> insert into TEST_DATA values (1,XMLTYPE(:INSTANCE))
      2  /
    
    1 row created.
    
    Elapsed: 00:00:00.01
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1
    
    --------------------------------------------------------------------------------------
    | Id  | Operation                | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------
    |   0 | INSERT STATEMENT         |           |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | TEST_DATA |       |       |            |          |
    --------------------------------------------------------------------------------------
    
    SQL> commit
      2  /
    
    Commit complete.
    
    Elapsed: 00:00:00.00
    SQL> select TEXT1, TEXT2, INT1, INT2
      2    from TEST_DATA,
      3         XMLTABLE(
      4           '/dataset'
      5            passing REC_DATA
      6            columns
      7              TEXT1 VARCHAR2(4000) path 'textField[@name="text_field1"]/text()',
      8              TEXT2 VARCHAR2(4000) path 'textField[@name="text_field2"]/text()',
      9              INT1      NUMBER(10) path 'integerField[@name="int_field1"]/text()',
     10              INT2      NUMBER(10) path 'integerField[@name="int_field1"]/text()'
     11           )
     12  /
    
    TEXT1
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    TEXT2
    ------------------------------------------------------------------------------------------------------------------------------------------------------
          INT1       INT2
    ---------- ----------
    Test1
    Test2
             1          1
    
    Elapsed: 00:00:00.07
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1764375565
    
    --------------------------------------------------------------------------------------------------------
    | Id  | Operation                           | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                    |                  |     1 |    20 |     7   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID BATCHED| TEXT_FIELD_TABLE |     1 |  4014 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN                  | TEXT_NAME_INDEX  |     1 |       |     1   (0)| 00:00:01 |
    |*  3 |  TABLE ACCESS BY INDEX ROWID BATCHED| TEXT_FIELD_TABLE |     1 |  4014 |     1   (0)| 00:00:01 |
    |*  4 |   INDEX RANGE SCAN                  | TEXT_NAME_INDEX  |     1 |       |     1   (0)| 00:00:01 |
    |*  5 |  TABLE ACCESS BY INDEX ROWID BATCHED| INT_FIELD_TABLE  |     1 |  2025 |     1   (0)| 00:00:01 |
    |*  6 |   INDEX RANGE SCAN                  | INT_NAME_INDEX   |     1 |       |     1   (0)| 00:00:01 |
    |*  7 |  TABLE ACCESS BY INDEX ROWID BATCHED| INT_FIELD_TABLE  |     1 |  2025 |     1   (0)| 00:00:01 |
    |*  8 |   INDEX RANGE SCAN                  | INT_NAME_INDEX   |     1 |       |     1   (0)| 00:00:01 |
    |   9 |  TABLE ACCESS FULL                  | TEST_DATA        |     1 |    20 |     3   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter("NESTED_TABLE_ID"=:B1)
       2 - access("SYS_ALIAS_8"."name"='text_field1')
       3 - filter("NESTED_TABLE_ID"=:B1)
       4 - access("SYS_ALIAS_7"."name"='text_field2')
       5 - filter("NESTED_TABLE_ID"=:B1)
       6 - access("SYS_ALIAS_6"."name"='int_field1')
       7 - filter("NESTED_TABLE_ID"=:B1)
       8 - access("SYS_ALIAS_5"."name"='int_field1')
    
    Note
    -----
       - dynamic statistics used: dynamic sampling (level=2)
    
    SQL>
    

    Published by: mdrake on March 14, 2013 11:13

  • Differences in behavior of plugin

    Hello.

    When you use some plugins (for example. Nik Viveza), the toolbar tab "Edit > Fade...» "Why cannot be used to modify the final effect?


    With some plugins (for example. Athentech perfectly clear), the command CAN be used.


    Why is there a difference between the behavior of plugins in Photoshop?


    Thanks for the tips.

    CrVMo.

    What the Bill is, represented graphically:

    These are functional equivalents:

    -Christmas

  • Differences in behavior in 11 g to indicate the LOV is available for a field

    People,

    Would appreciate some patience when you answer this question, because it would be obvious to those of you who deal with forms on a daily basis and have done for years. I'm a DBA who came recently in a small shop where I get to do some thing/all which has the name of Oracle on it. We have a Forms application that has been around for a long time. I just migration of databases and our Forms/application on Linux Server (version 5.6 (Tikanga) of OEL 5 Red Hat Enterprise Linux Server) and the last stack (Weblogic 10.3.4 Fusion Middleware 11.1.1.4). We were on Forms 10gR 1, I think that, since the version indicated by opatch says "Oracle Application Server forms and reports Services 10 g 9.0.4.0.0."

    So, I installed the software WLS/FMW on the new box, configured and it guaranteed without any major problems. I copied on the * .fmb of old for nine box and their migration using the tool/script...then compiled all forms in 11 g and got again * of .fmx. There were several warnings during migration on deprecated features, but no error... our Forms application is quite simple in nature... nothing really complex that I've encountered so far.

    While we tested, our users have noticed two changes in the behavior that bothered them.
    (1) they have been accustomed to see points of suspension (...) appear on the far right in the field, if there is an associated LOV. They still get a message at the bottom that there is an LOV, but no visual indication in the field itself. And they can do a Ctrl-L to display the LOV, as before.
    (2) when they navigate using the mouse to a field, it is used to highlight the whole field so that they can re - type the value. Now, he puts just the cursor exactly where they sailed in the area. Tab and in the field will highlight the whole area for re - type.

    I watched for a while and you don't see any property to get either a behavior to return the value. I compared the property sheets for the previous version of property sheets for the current version... and all the properties and the values appear to be exactly the same.

    Can someone tell me if this is expected (i.e. 'live with it') behavior or if there is something that I missed in the configuration of the application? I have been away from forms since Forms 4.5/Developer 2000 called, so part of the behavior may well be the new way of things. I also watched the *.env files and entries appear the same (essentially all faults - aspect, etc.). I might just miss something manuals (that look amazingly similar because they study at the end of the 1990s).

    The help/pointers would be appreciated.
    Thank you
    Rob

    For the first question, I'm not sure about ellipsis in the corner of the field, but you can try to set app.ui.lovButtons = true in the registry.dat file.
    This file in 11g should be in $DOMAIN_HOME/config/fmrconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/forms/registry/oracle/forms/... Easy to find ;)

    Regarding the second question, in 11 g of the matches of the behavior is changed. You can work around by using built-in SELECT_ALL. You can call it in click When starting at the level of the form.

  • Differences in the behavior of a Cork in CS6 and CS5.5

    I noticed a difference in behavior of plugin in CS6 and CS5.5.

    In a SequenceSetup function the following call generates a PF_Cmd_ARBITRARY_CALLBACK in CS6 with the State PF_Arbitrary_FLAT_SIZE_FUNC of the additional parameter. The PF_Cmd_ARBITRARY_CALLBACK even appears later in a plugin works and does not work properly in CS6. Although there is no problem with this function in CS5.5, it generates no odd events.

    Suites. ParamUtilsSuite1()-> PF_GetCurrentState (in_data-> effect_ref,) & seqData-> curSessionParamState; (code for CS5.5)

    Suites. ParamUtilsSuite3()-> PF_GetCurrentState (-> effect_ref, PF_P aramIndex_CHECK_ALL, NULL, NULL, in_data) & seqData-> curSessionParamState; (updated code for CS6, in the respect that the signature of PF_GetCurrentState has changed)

    I work under Windows 7 x 64. CS6 is 11.0.0.378 version CS5.5 is 10.5.0.253 version. The only change between these two versions of the plug is the signature of PF_GetCurrentState. So I guess the problem is inside a new SDK. But I did not guess where it may be... You have an idea, what might have changed in CS6 to provide such a mistake?

    Hello

    The problem was not in the call to PF_GetCurrentState. We use multithreading to manage an image in our plugin. And each thread must call PF_Progress callback in turn. But it turned out that "no reminder æ is thread-safe unless explicitly indicated.

    Thanks to technical support After Effects of quick and friendly responses!

  • table behavior difference between php and flex?

    I think that this problem is probably caused by a difference in behavior of the table between php and flex I am not quite striking.  It's the flex code that I wrote and the php code is shown below.  I'm new to flex and this really left me speechless.    Thanks a lot for your help.

    The entries are father = [SB1, kit] dam [kit, kit] = sireLinkedP = E (P) and [e F]

    Output should be (and is with PHP) random = [E, P, SB1], [E, P, kit], [e, P, SB1], [e kit, P],

    What I get is random = [E, P, SB1, kit], [E, P, SB1, kit], [e, P, SB1, kit], [e, P, SB1, kit]

    function randomlinks(sire:Array,dam:Array,sireLinkedP:Array):Array {}

    var str:String [0] sire = .toUpperCase ();

    var str1:String sire [1] = .toUpperCase ();

    var str2:String dam [0] = .toUpperCase ();

    var str3:String dam [1] = .toUpperCase ();

    var x: uint = sireLinkedP.length;

    var k: uint = 0;

    var random: Array = new Array();

    x--;

    trace ("randomlinks sirelinked:" + sireLinkedP);

    for (var i: uint = 0; i < = x; i ++) {}

    for (var j: uint = 0; j < = 1; j ++) {}

    random [k] = sireLinkedP [i];

    trace ("random" + k + ":" + random [k]);

    If (str == [0] sire | str1 == sire [1] | str2 == dam [0] | str3 == dam [1]) {}

    random [k] .push (sire [j]);

         }//end if

    trace ("random" + k + ":" + random [k]);

         k++;

    } //end for loop

    } //end for loop

    trace ("randomlinks:" + random);

    return (random);

    { } //end randomlinks function

    function randomlinks ($sire, $dam, $sirelinked) {}

    $x = count ($sirelinked);

    $x--;

    $k = 0;

    for ($i = 0; $i < = $x; $i ++) {}

    for ($j = 0; $j < = 1; $j ++) {}

    $random [$k] = $sirelinked [$i];

    if (ctype_upper($sire[0]) | ctype_upper($sire[1]) | ctype_upper($dam[0]) | ctype_upper($dam[1])) {}

    array_push($random[$k],$sire[$j]) ;}

    $k++;

    }

    }

    Return ($Random);

    }

    You are right to make a copy. In Flex, the tables are references, if this assignment: random [k] = sireLinkedP [i] affects [k] random real behind sireLinkedP [i] matrix instead of a copy. Who is?

    -Kevin

  • Performance of XMLType Insert too SLOW

    Hello

    Goal: Insert performance 0.1 seconds
    AMRS, Client 11 g server is presnt in Asia. Network intranet =
    Size of object = 15000 bytes. Size max = 30000 bytes

    Problem: executeUpdate takes about 0.33 sec. However, getTemporaryClob is very slow, arnd - 1.33 sec

    In getTemporaryClob()->
    CLOB.createTemporary-> 0.2 s
    CLOB.getCharacterOutputStream-> 0.2 s
    Writer.Close-> 0.8 s

    Alternative:
    XMLType.createXML (conn, InputStream) is far too slow.

    My approach:
    SQL = Insert into mytable Values (XMLType (?))
    CLOB c = getTemporaryClob()
    preparedStatement.setObject (1, c);
    preparedStatement.executeUpdate ();

    1. is there another solution? (for example: could I send the bytes directly rather than create a CLOB)
    2. in the creation of CLOB, for each object I create temporary Clob, getStream & Flush writer, writer close CLOB, before I run the query. Is there a way to create TempClob only once and insert the number of records with the same temporary clob (I should require only Writer.write (String))?

    Thanks in advance.

    In the following help: Re: performance problems loading XML into a remote table into a local table (also follow the AskTom url)
    Try to understand the difference in the XMLType storage, which is mainly the cause of some problems.

  • Foglight for virtualization - Standard Edition - storage latency

    Hello

    I would like to know how to tell the difference between the latency of storage on different data warehouses - rather than having the same threshold at all.

    The default settings suits us well on our warehouses of data production, but we have some data warehouses where 200ms is no problem and would like to have that reflected in foglight to avoid SPAM-alerts.

    Best regards

    Bjarke Emborg Kragelund

    Hello

    There are probably 2 ways to handle this, if it's that the first option will be faster to implement a large number of data warehouses:

    1 change the rule and put a condition on the name of the store of data and comparison with a different value for data warehouses where this latency is different.

    2. When you look at the rule condition there is usually some kind of variable, something like datastoreLatency.warning/critical/fatal or something similar. When you go to administration > manage registry variables, you can find your variable and edit and brought it. To have a different value for data warehouses where you want other Scope values

    Press next and choose the right database and set a value for it

    Hope this helps

    Golan

  • Behavior inconsistent performance Oracle query

    Consider the following query:

    SELECT * FROM ( SELECT ARRM.*, ROWNUM FROM CRS_ARRANGEMENTS ARRM WHERE CONCAT(ARRM.NBR_ARRANGEMENT, ARRM.TYP_PRODUCT_ARRANGEMENT) > CONCAT('0000000000000000', '0000') ORDER BY ARRM.NBR_ARRANGEMENT, ARRM.TYP_PRODUCT_ARRANGEMENT, ARRM.COD_CURRENCY) WHERE ROWNUM < 1000;

    This query is performed on a table that has 10 000 000 entries. While running the query Oracle SQL Developer or my application it takes 4 minutes to run! Unfortunately, it's also the behaviour within the application I am writing. Change the value of 1000 to 10 has no impact, which suggests that he made a full table scan.

    However when the squirrel running the query returns within a few milliseconds. How is that possible? Explain plan generated in squirrel gives:

    Explain plan in SQuirreL

    But a plan different explain is generated in Oracle SQL Developer, for the same query:

    Explain plan in Oracle SQL Developer

    No idea how this difference in behavior is possible? I can't understand it. I tried with JPA and raw JDBC. In the application, I need to parse through 10 000 000 records and this query is used for pagination, so 4 minutes of waiting is not an option (which would take 27 days).

    Note: I use the same Oracle jdbc driver into a squirrel and my application so it's not the source of the problem.

    I also posted this to other web sites, for example

    http://StackOverflow.com/questions/28896564/Oracle-inconsistent-performance-behaviour-of-query

    OK - I created a test (below) case and got the same exact results you did 'test' - a FFS using SQL index * more. I then tested with SQL Developer and got the same results. You are 100 billion sure that you did not have two databases somewhere with the same name?

    SQL> create table crs_arrangements
      2  (nbr_arrangement varchar2(16) not null,
      3   product_arrangement varchar2(4) not null,
      4   cod_currency varchar2(3) not null,
      5   filler1 number,
      6  filler2 number);                                             
    
    Table created.                                                    
    
    SQL> alter table crs_arrangements add constraint crs_pk primary key
      2  (nbr_arrangement, product_arrangement, cod_currency);        
    
    Table altered.                                                    
    
    REM generate some data
    
    SQL> select count(*) from crs_arrangements;          
    
      COUNT(*)
    ----------
      10000000                                           
    
    SQL> exec dbms_stats.gather_table_stats('HR', 'CRS_ARRANGEMENTS', cascade=>true);
    
    SQL> ed
    Wrote file afiedt.buf                                                        
    
      1  explain plan for
      2  SELECT * FROM
      3    ( SELECT ARRM.*, ROWNUM FROM CRS_ARRANGEMENTS ARRM
      4      WHERE CONCAT(ARRM.NBR_ARRANGEMENT, ARRM.PRODUCT_ARRANGEMENT) > CONCAT('
    0000000000000000', '0000')
      5* ORDER BY ARRM.NBR_ARRANGEMENT, ARRM.PRODUCT_ARRANGEMENT, ARRM.COD_CURRENCY)
    WHERE ROWNUM < 1000
    SQL> /                                                                       
    
    -------------------
    | Id  | Operation                      | Name             | Rows  | Bytes | Cost
    (%CPU)| Time     |
    --------------------------------------------------------------------------------
    -------------------
    |   0 | SELECT STATEMENT               |                  |   999 | 55944 |  112
    7   (0)| 00:00:14 |
    |*  1 |  COUNT STOPKEY                 |                  |       |       |
           |          |
    |   2 |   VIEW                         |                  |  1000 | 56000 |  112
    7   (0)| 00:00:14 |
    |   3 |    COUNT                       |                  |       |       |
           |          |
    |   4 |     TABLE ACCESS BY INDEX ROWID| CRS_ARRANGEMENTS |   500K|    17M|  112
    7   (0)| 00:00:14 |
    |*  5 |      INDEX FULL SCAN           | CRS_PK           |  1000 |       |   13
    0   (0)| 00:00:02 |      
    

    However, as noted earlier in this thread:

    alter session set NLS_SORT = FRENCH;
    
    |   0 | SELECT STATEMENT        |                  |   999 | 55944 |       | 202
    85   (1)| 00:04:04 |
    |*  1 |  COUNT STOPKEY          |                  |       |       |       |
            |          |
    |   2 |   VIEW                  |                  |   500K|    26M|       | 202
    85   (1)| 00:04:04 |
    |*  3 |    SORT ORDER BY STOPKEY|                  |   500K|    17M|    24M| 202
    85   (1)| 00:04:04 |
    |   4 |     COUNT               |                  |       |       |       |
            |          |
    |*  5 |      TABLE ACCESS FULL  | CRS_ARRANGEMENTS |   500K|    17M|       | 155
    48   (1)| 00:03:07 | 
    

    Can you check your preferences of SQL Developer under database-> NLS and ensure that sorting is set to BINARY? I wonder if either he is on something else in SQL Developer or maybe your by default, the database is not BINARY and squirrel is assigning BINARY when connecting.

  • Insert in varchar2 select xmltype column: extremely slow

    I use oracle10gR2 10.2.0.4 and solaris10 64bits

    I need to select the data to an xml value in a table of column xmltype (word.testmeta)

    and insert into another table (word.testwordyy)

    desc word.testmeta;
    Name                 Null?    Type
    --------------------------------------
    FILENAME             CHAR(2000)
    XMLDATA              XMLTYPE
    
    
    desc word.testwordyy;
    Name                 Null?    Type
    ---------------------------------------
    ID                   VARCHAR2(255)
    KEYWORD              VARCHAR2(4000)
    

    and I use xmltable

    insert /*+append */ into word.testwordyy(KEYWORD)
    select /*+ gather_plan_statistics */ dbms_lob.substr(xmltype.getclobval(b.KEWOR),254)
    from word.testmeta , xmltable
    (
    '$B/mets/KEWOR'
    passing
    word.testmeta.XMLDATA as B
    columns
    KEWOR xmltype path '/KEWOR/text()'
    )
    b
    

    > select * from table(dbms_xplan.display_cursor(null,null,'iostats last')); 
    
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  37ua3npnxx8su, child number 0
    -------------------------------------
    insert /*+append */ into word.testwordyy(KEYWORD) select /*+ gather_plan_statistics */
    dbms_lob.substr(xmltype.getclobval(b.KEWOR),254) from word.testmeta , xmltable ( '$B/mets/KEWOR' passing word.testmeta.XMLDATA as
    B columns KEWOR xmltype path '/KEWOR/text()' ) b
    
    
    Plan hash value: 875848213
    
    
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                           | Name                   | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  | Writes |
    
    
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    |   1 |  LOAD AS SELECT                     |                        |      1 |        |      1 |00:10:32.72 |   16832 |      7 |   90 |
    
    
    |   2 |   NESTED LOOPS                      |                        |      1 |     29M|  34688 |00:00:25.95 |   12639 |      5 |    0 |
    
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------------------
    |   3 |    TABLE ACCESS FULL                | TESTMETA               |      1 |   3638 |   3999 |00:00:00.08 |     909 |      0 |    0 |
    
    
    |   4 |    COLLECTION ITERATOR PICKLER FETCH| XMLSEQUENCEFROMXMLTYPE |   3999 |        |  34688 |00:00:24.50 |   11730 |      5 |    0 |
    
    
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------------------
    Note
    -----
       - dynamic sampling used for this statement
    
    
    
    
    21 rows selected.
    

    and the more the number of rows in the word.testmeta table, the more time spent by rank

    I have a small simple XML but I need to process a large amount of them (5000000) as well as the treatment is very very slow when the lines of more than 8000

    Is there an optimization or the fastest?

    Why? Because you do a manipulation of LOB lob.

    Your XMLType is the kind of CLOB storage

    Your chain of subtr quantities are manipulationg LOB

    Altogether, the XML must be done in memory (XMLSEQUENCEFROMXMLTYPE), the manipulation of strings (CLOB) become bigger and bigger and bigger and will eat all your memory and CPU resources.

    How to solve it?

    Upgrade to a supported database version (11.2.0.3 and upwards)

    Store XML documents in a binary XML format of XMLType Securefile

    Use simple methods like XMLCAST to make the string conversion and manipulation

    Or...

    .. m:System.NET.HttpListener.start reading by doing the hard (and today with a version of database not supported), 10.2 through storage XMLType object / relational and convert you CLOB, XMLType storage for storing XMLType object / relational. Use the functions and operators that are created to make the manipulation of strings instead of DBMS_LOB Package (which is not free memory automatically)

  • Subscriptions: the difference between $9.98 and $19.98?

    I look at the subscription "photography" which seems to include the Photoshop and Lightroom, to $9.99 per month, and... simple app "Photoshop" at... $19.99.

    I don't give not a d... n on Lightroom, then should I buy both to pay half price even if I do want Photoshop? Or are these different Photoshop editions? What is the idea of this award? strength of lightroom in people ' throat?

    Rob

    Hello

    The main difference is between the cloud storage space.

    With the map of photography for $ 9.99, you get only storage space cloud of 2 GB where in the plan of implementation only $19.99 you will be entitled to 20 GB of cloud storage space.

    Kind regards

    Sheena

  • This is expected behavior with master isolation?

    Hello

    I test HA in a vSphere cluster 5.1 and I want to know if the behavior seen when a master is isolated is normal.

    I have 2 knots in my dev Setup. When I isolate my slave (host B) virtual machine stays on as planned (response of isolation leave it powered on).
    Host B shows that does not and the virtual machine is disconnected, so this works as expected.

    When I isolate my master (host A) of network management of the electoral process unfolds.  Host A show that does not as expected. My virtual machine appears as turned on host B off.
    The diary of events for the virtual machine tells me that

    -the VM is off on host B

    -l' host B cannot open the VMX file

    -vSphere HA switched in vain this virtual machine

    All the while my VM is accessible and functional. As soon as the host has is is more isolated my VM appears as again propelled this issue.
    If everything seems to work as it should, but in vCenter messages say otherwise. Is this normal?

    When I simulate a failed host everything works as expected, regardless of whether it is master or slave

    The behavior you're seeing is planned.

    Let's start with your recent tests. When you remove the current master of the management network, the other FDM is still able to communicate with the master, and so it reconnects with the 2nd network. The election you are seeing is the result of this process - the slave FDM lost access to the master, drops in the State of the election, received a message 'am master' of a master and connected. A master of FDM sends 'Master am' election messages on all its management networks every second and a slave will connect to the master using any network of which he received this message.

    VC reports no master, as you alluded to, is because the VC cannot communicate with the master. VC knows that there is a master because the other FDM would have said what is the master. I'll drop a PR for us to improve the text of question config.

    Regarding your original posting, I think that the difference of behavior you observed is due to a problem that we have fixed in version 5.5. When you have isolated the master, a new master election occurred. There is a race (we closed) between the new master learning that on the old host virtual machines are turned on and the main workflow for the restart of virtual machines. If restarting the workflow performed too fast, the new master would try to restart the virtual machines that he discovered later were running on the remote host.

    Finally, a clarification of the following statement by taking in charge:

    "As it is the master who shall report to the vCenter, until a new Master has been established, the display in vCenter won't be accurate when it is isolated.  (I think vCenter new elections of master/slave status is checked every 2 minutes by default).

    VC checks actually for a master every 10 seconds by default. How much is the value of 2 minutes of time VC tries to connect to a master before it reports via an event/config-problem, what it does.

  • View Load Balancing Hosts with local storage

    Hello

    After the use of VMWare for server virtualization, it is time to move to the next step.

    We are in the middle of a display driver 5 :-)

    At the moment I have 2 host vmware (esxi 5) with storage connected to a San.

    My "master VM" is in the SAN and connected to two hosts.

    A pool is created and data warehouses them are selected for the pool.

    The replicas are created on two local data stores when I set up the pool.

    At the time, my drivers 10 users working on a related Clone which is located on the local storage.

    The strange thing is that all users are running on a single host.

    East on the host with the most free space.

    When I remove the data store, the virtual machine is created on the other host.

    After adding it, are all the vm on the store with the largest disks again.

    How can I configure display to use the two hosts?

    This is a normal behavior of View Composer to put desktops on the storage the largest space available. You can change this behavior by adjusting storage approval settings. Take a look at this blogpost:

    http://www.simonlong.co.uk/blog/2011/02/09/VMware-view-4-5-rebalance/

  • Object Table of XMLType vs single column of XMLType Table

    What are the differences between the XMLType table object and a table with a single column of XMLType?

    It's

    CREATE TABLE XMLType xml_table;

    and

    CREATE TABLE xml_table (xml_field XMLTYPE);

    That should be used and when? Both may be declared to be aware of schema.

    The main difference is that an XMLType object array allows the use of the XML DB Repository to store and retrieve XML content.
    The relationship between a resource and its content is maintained by a "pointer" (REF XMLType) line in the XMLType table:

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb03usg.htm#ADXDB4223
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb03usg.htm#BJFBDEJE

    Tables based on the patterns of XMLType (including the associated nested structure) can also be created automatically through recording scheme, which is very convenient when the pattern becomes complex.
    In addition, a registred schema-compliant documents that go into the repository automatically stored in the table by default (see the annotation xdb:defaultTable).
    We can also use ACLs to control access to specific rows in a table of object XMLType.

    This is not possible with XMLType columns in a relational table.

  • Change the buffer pool of a partition LOB that underlie an XMLTYPE in a table?

    Hi all

    First of all, I must say, 'ALTER TABLE' grammar is ridiculously complex, and they seem to keep piles.

    OK, that said, I have a table with an XMLTYPE column:
    SQL> desc cs_content_xml_data
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     CSXML_GOID                                NOT NULL NUMBER(15)
     CSXML_DOC                                 NOT NULL XMLTYPE STORAGE BINARY  <<---Here's my XMLTYPE column
     CSXML_DATASET                             NOT NULL VARCHAR2(1)
     CSXML_PART_DATASET                        NOT NULL VARCHAR2(15)
     CSXML_DATE_CREATED                        NOT NULL TIMESTAMP(6)
     CSXML_USER_CREATED                        NOT NULL VARCHAR2(30)
     CSXML_DATE_MODIFIED                                TIMESTAMP(6)
     CSXML_USER_MODIFIED                                VARCHAR2(30)
    In addition, this table is partitioned. Here is the generated DDL, with truncated partition definitions, for brevity:
      CREATE TABLE "MSTMFG"."CS_CONTENT_XML_DATA"
       (    "CSXML_GOID" NUMBER(15,0) NOT NULL ENABLE,
            "CSXML_DOC" "SYS"."XMLTYPE"  NOT NULL ENABLE,
            "CSXML_DATASET" VARCHAR2(1) NOT NULL ENABLE,
            "CSXML_PART_DATASET" VARCHAR2(15) NOT NULL ENABLE,
            "CSXML_DATE_CREATED" TIMESTAMP (6) NOT NULL ENABLE,
            "CSXML_USER_CREATED" VARCHAR2(30) NOT NULL ENABLE,
            "CSXML_DATE_MODIFIED" TIMESTAMP (6),
            "CSXML_USER_MODIFIED" VARCHAR2(30),
             CONSTRAINT "CSXML_GOID_PK" PRIMARY KEY ("CSXML_GOID")
      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 DE
    FAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "MSTMFG_DATA"  ENABLE,
             CONSTRAINT "CSXML_CIT_FK01" FOREIGN KEY ("CSXML_GOID")
              REFERENCES "MSTMFG"."CONTENT_ITEMS" ("CIT_ID") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255  NOLOGGING
      STORAGE(
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "MSTMFG_DATA"
     XMLTYPE COLUMN "CSXML_DOC" STORE AS SECUREFILE BINARY XML (
      ENABLE STORAGE IN ROW CHUNK 8192
      NOCACHE NOLOGGING  NOCOMPRESS  KEEP_DUPLICATES
      STORAGE(
      BUFFER_POOL DEFAULT <<-- This BUFFER_POOL setting is what I want to change, I think
    FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
    ALLOW NONSCHEMA DISALLOW ANYSCHEMA
      PARTITION BY RANGE ("CSXML_PART_DATASET")
     (PARTITION "DATASTAR_XML_DATA_01"  VALUES LESS THAN ('D002')
      PCTFREE 30 PCTUSED 40 INITRANS 1 MAXTRANS 255  NOLOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL RECYCLE FLASH_CACHE DE
    FAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "MSTMFG_DATA" NOCOMPRESS ,
     PARTITION "DATASTAR_XML_DATA_02"  VALUES LESS THAN ('D003')
      PCTFREE 30 PCTUSED 40 INITRANS 1 MAXTRANS 255  NOLOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL RECYCLE FLASH_CACHE DE
    FAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "MSTMFG_DATA" NOCOMPRESS,
    --lots of table partition definitions omitted here, for brevity
    So, my question is, how to change the attribute default USER_TABLES of the PARTITION's LOB that underlies the storage of XMLTYPE column? How can I change to RECYCLE, DEFAULT value?

    I tried several variants, no success, and I can't find an example in the manual or on the web anywhere.

    Can anyone offer me a clue?

    Help!

    Thank you

    -Mark

    Hello

    Have you tried the following?

    ALTER TABLE cs_content_xml_data MODIFY LOB (CSXML_DOC.xmldata) ( STORAGE( BUFFER_POOL RECYCLE ) );
    

    HTH.

Maybe you are looking for

  • What is suhelperd and why it takes CPU %

    My battery has been falling quickly lately so I did some research to figure out why. Suhelperd contains the highest percentage of my CPU to approximately 98.7 (compared to safari which is 3.0). What is - this, and it's something that I can get rid of

  • OneKey theater button

    Hi all Is there a button of Onekey Theater a Lenovo Idepad?

  • After powering OFF reboot loop...

    I feed my backflip off last night and since then when I try to turn it on it constantly restarts... What can I do?

  • Envy120 all-in-one not to copy

    Our 120 want all-in-one does not copy. Wireless printing works very well. But when I load top something to copy everything that comes out is a full page of dark ink. Is there a light that could be since no light comes from the bar.

  • screen cracked on my HP Envy 15-k204sa

    Hi unfortunately my HP Envy 15-k204sa cracked screen and I need to replace it. Can someone tell me which screen I need to buy and where I could by her? I'm in the United Kingdom Thanks much for any guidance Mark