VERY slow SDO_GEOM.RELATE funcktion call

Hi,
I have the table definition below. The table contains over 3,5 million records. What we experience is that the following query runs terribly slow. With 100 thousand records it takes 14 seconds, with 3,5 million records we can not wait till it executes.
Is the relate function supposed to handle this amount of data? We are using oracle 11g on Windows.
Regards,
Tamas
*======= SLOW RUNNING QUERY ===================*
function FM_SELECT_OG_BY_GEOM_CUR(I_OG mdsys.SDO_GEOMETRY,
I_MASK varchar default G_MASK ,
I_TOLERANCE number default G_TOLERANCE )
return SYS_REFCURSOR is
L_REC_SET SYS_REFCURSOR;
begin
open L_REC_SET for
select OG.AZONOSITO
from OBJEKTUM_GEOMETRIAK OG
where MDSYS.SDO_GEOM.RELATE(OG.OBJEKTUM_GEOMETRIA,
I_MASK,
I_OG,
I_TOLERANCE) != 'FALSE';
return L_REC_SET;
exception
when others then
open L_REC_SET for 'select null AZONOSITO from dual where 1=2 ';
return L_REC_SET;
end;
*======= TABLE DEFINITION ======================*
create table OBJEKTUM_GEOMETRIAK
AZONOSITO number( 10 ),
OBJEKTUM_SZIMBOLIKA number( 10 ) not null,
OBJEKTUM_AZONOSITO number( 10 ) not null,
OBJEKTUM_GEOMETRIA sdo_geometry, -- pontatlan
MAP_ID number( 10 ) not null,
COLOR number( 5 ),
STYLE number( 2 ), -- STYLE
WEIGHT number( 2 ), -- WEIGHT
FONT_ID number( 3 ), -- FONT
WIDTH number( 9,3 ), -- WIDTH
HEIGHT number( 9,3 ), -- HEIGHT
JUSTIFICATION_ID number( 2 ), -- JUSTIFICATION
FELIRAT varchar( 256 ),
FORGATAS number(10,3),
     OBJEKTUM_KOMPONENS number( 10 ) not null
) tablespace MIR_TAB_MST;
alter table OBJEKTUM_GEOMETRIAK add (primary key (AZONOSITO));
create index IDX_OBJEKTUM_GEOMETRIAK_2
on OBJEKTUM_GEOMETRIAK( MAP_ID )
tablespace MIR_IDX_MST;
insert into USER_SDO_GEOM_METADATA
values ( 'OBJEKTUM_GEOMETRIAK',
'OBJEKTUM_GEOMETRIA',
MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT( 'X',
600000,
900000,
0.001 ), MDSYS.SDO_DIM_ELEMENT( 'Y',
150000,
400000,
0.001 ) ),
null );
create index IDX_OBJEKTUM_GEOMETRIAK_1 on OBJEKTUM_GEOMETRIAK ( OBJEKTUM_GEOMETRIA ) indextype is MDSYS.
SPATIAL_INDEX
parameters(' ') noparallel;
create index IDX_OBJEKTUM_GEOMETRIAK_3
on OBJEKTUM_GEOMETRIAK (OBJEKTUM_AZONOSITO )
tablespace MIR_IDX_MST;

HI,
Just want to add some information between the performance difference between a spatial operator and spatial function:
A spatial operator takes advantage of spatial indexes while a spatial function does not.
In your case, sdo_geom.sdo_relate is a spatial operator and sdo_geom.relate is a spatial function.
They serve the same functionality but might have huge performance difference if you have a big table.
In general, the complexity (performance) for spatial operators is O(ln N) and, spatial functions, O(N), while N is the number of geometry you will query against.
This is true for all Oracle Spatial operators and their corresponding spatial functions.
So try to use spatial operators in your query if they are available.
Jack

Similar Messages

  • My samsung stratosphere is very slow to place a call.  I input the number and push CALL.  Nothing happens.  I try it again and nothing happens.  Then some time later (2-5 mins) the phone goes ahead and dials.  What is causing this delay in dialing?

    my samsung stratosphere is very slow to place a call.  I input the number and push CALL.  Nothing happens.  I try it again and nothing happens.  Then some time later (2-5 mins) the phone goes ahead and dials.  What is causing this delay in dialing.

    wadams5641,
    Let's add some speed to your service and ensure you can make calls without the
    delay. When was the last time you turned off your phone? Is the software up to
    date?
    KarenC_VZW

  • After ICS upgrade Phone is very slow to make a call

    After ICS upgrade , when I select a contact to call , and then press cell or home , the response time is very slow.
    I have pressed the call button more than once thinking it did not take. Then when it does take I end up calling the person
    more than once because it has buffered the calls . What can be causing this ?
    If you have an answer Please email me at: Personal email address removed to comply with VZW ToS<     Thanks
    Message was edited by: Verizon Moderator

    Mine and my wifes thunderbolts have become horrible since the upgrade was pushed.  Apps are slow, or don't even load some times.  Trying to make a phone call is sluggish and at times it will try to call twice at the same time for some reason.
    however, i overlooked all of this because i liked the look of ICS.  then last week after being pushed two updates in a row, it now will just turn off at random times.  i can't even go to a webpage anymore because it will immediately crash.  better yet, when i try to reboot the phone, it will get to the point where it recognizes the verizon network, and then just shut off again.  this happened to me 8 times in a row the other day.  it will also say that the battery is in the red, even though it had a full charge before the crash.
    i have found that if i plug my phone in and then boot it up, it will boot up correctly.  that is the only way i have been able to get it to actually boot up since all of this started happening.  it will still show the battery is about to die, and then about 15 minutes later it will show it is at 100% again.
    i tried to do the chat with a reprensentative today and the guy was asking for my account password before he could look into my issue.  what kind of company asks for a password.  that is the dumbest thing i have seen.  so now, i have a phone that "sometimes" works, and online chat that reminds me of a scamming site. 
    when my wife called to talk to someone they told her that it was htc's fault and that it would cost us $60 each to switch to new phones.  how is that customer service?  besides, verizon's network sent the update.  there is no way that they can try to say it wasn't their fault.  that isn't how the real world works.
    i have reposted this from another thread, but since there seems to be someone from VZW reading this, perhaps some info can be found...

  • Very slow receiving and placing calls

    My Z30 lags big time when placing a call and also when answering an incoming call.. I would say there is a 10 - 20 second delay.. very annoying, is anyone else experiencing this issue? Is there a solution to this problem?
    Solved!
    Go to Solution.

    Yes, resetting the phone solved the problem of slow call out and receiving call!
    Yay, thank you!

  • FlasCC compiled swc library is very slow on first function call - how can I speed it up?

    Hi everyone,
    I have a C++ library that fits a mesh onto images of faces, now compiled into an swc.
    I have just exposed one function from the library, that operates on a BitmapData and returns a Vector of Points indicating various parts of the face.
    The problem is that the first call to the library (to process the first image) seems to take about 10 seconds. After that repeated calls take a fraction of a second.
    Is there any way I can improve the performance on the first call, by initialising my library class in an init method or something? In the target application most users will only call the library once, so I need to improve this.
    UPDATE: Profiling in Flash Builder, the [verify] action (which I understand is JIT bytecode verification) takes 10.1 seconds. The other main culprits are [avm1] (1.7s) and global$init.global$init (2.0s).
    Can this be normal behaviour that JIT verification takes 10 seconds? Or can I speed it up? The source C++ code is probably 100,000 lines because it includes several modules from OpenCV, however so does Alex Mac's OpenCV demo and it doesn't take this long.
    Below is the code for my library wrapper. Very grateful for any help!
    #include <AS3/AS3.h>
    #include <AS3/AS3++.h>
    #include <Flash++.h>
    #include "FlashCLM.h"
    using namespace AS3::local;
    // First we mark the function declaration with a GCC attribute specifying the
    // AS3 signature we want it to have in the generated SWC. The function will
    // be located in the com.FrameFish namespace.
    void fitCLM() __attribute__((used,
              annotate("as3sig:public function fitCLM(img:BitmapData,shape:Vector.<Point>):int"),
              annotate("as3package:com.FrameFish"),
              annotate("as3import:flash.utils.ByteArray"),
              annotate("as3import:flash.geom.Point"),
              annotate("as3import:flash.display.BitmapData"),
              annotate("as3import:flash.Vector")));
    void fitCLM(){
              AS3_Trace("fitCLM starting");
              // Copy pixels to C ram
              inline_as3(
                        "var ba:ByteArray = img.getPixels(img.rect);\n"
            "var imgPtr:int = CModule.malloc(ba.length);\n"
                        "ba.position = 0;\n"
                        "CModule.writeBytes(imgPtr, ba.length, ba);\n"
        uint8_t* pixels = 0;
        AS3_GetScalarFromVar(pixels, imgPtr);
              // Get the width and height of image
              inline_as3(
                        "var w:int = img.width;\n"
                        "var h:int = img.height;\n"
              int width, height;
              AS3_GetScalarFromVar(width, w);
              AS3_GetScalarFromVar(height, h);
              // Fit CLM
              ff::FlashCLM clm;
              int shapeSize = 58*2; // Size of the imm_face_db markup
              int* shapeBuffer = new int[shapeSize];
              int result;
              clm.fit(pixels, width, height, shapeBuffer, &shapeSize, &result);
              // Copy shape to as3 shape vector
              if (result == ff::FlashCLM::FOUND){
                        for (int i=1; i<shapeSize; i+=2){
                                  inline_as3(
                                            "var x:Number = %0;\n"
                                            "var y:Number = %1;\n"
                                            "var p:Point = new Point(x,y);\n"
                                            "shape.push(p);\n"
                                            : : "r"(shapeBuffer[i-1]), "r"(shapeBuffer[i])
              // Clean up C memory
              inline_as3(
                        "CModule.free(imgPtr);\n"
              delete shapeBuffer;
        // return the result (using an AS3 return rather than a C/C++ return)
        AS3_Return(result);
    int main(){
        // We still need a main function for the SWC. this function must be called
        // so that all the static init code is executed before any library functions
        // are used.
        // The main function for a library must throw an exception so that it does
        // not return normally. Returning normally would cause the static
        // destructors to be executed leaving the library in an unuseable state.
        AS3_GoAsync();

    I never did get to the bottom of it. I got this response from Alex Mac:
    It's hard to give good advice at the C++ level because the problem is more
    of  a code generation issue. When a function ends up requiring too many
    registers to be live at once the resulting AS3 code can in some cases cause
    the verifier to take a long time to run. Exception handling and
    setjmp/longjmp can contribute to this, but so can things beyond your
    control when LLVM inlines too much into a single function and ends up
    generating unreasonable code...
    In the end I moved most of my C++ code out of flash and on to a server. To
    me flascc was a nice idea but didn't live up to the hype

  • Very slow first Mobile Service call after one minute incativity

    My mobile service api (basic tire) response about 30 sec delay for the first call. The subsequent calls are fine but the first call even sometimes times out. Which is totally unacceptable. The worse is that after one minutes inactivity it stars again.
    It uses SQL Server (Standard tire) which is the culprit I guess. Because if I do a manual db query before
    the time lag of the api call disappear. I set up automated api calls  requesting db quires in about every minutes but did not helped. Looks like they are screened. 
    What should I do until I have enough customers to get an api call every minutes?
    It's a quite important issue because due to the bad user experience the app will never have enough customers.

    I have done a lot of testing to gain more accurate data about the case. It's quite time consuming because I have to wait some minutes after each testing. I focused this time only one of my stored procedure and measured it from the app, from browser and from
    VS SQL Server and turned out I was wrong there is a similar significant time lag from all method and if I wait enough about half an hour in all method the stored procedure call will time out. Thus, the underlying issue is probably in SQL Server.
    The VS SQL Server provides the following error massage:
    Msg 4083, Level 16, State 1, Procedure likingProbability, Line 51
    The connection was recovered and rowcount in the first query is not available. Please execute another query to get a valid rowcount.
    The actual rowcount in the code:
    SELECT @howGood = howGood FROM goodforme.Scans WHERE itemId = @itemId AND userId = @userId
    IF (@@ROWCOUNT > 0 AND (@howGood = @MAX_RATE OR @howGood = @MIN_RATE))
    BEGIN
    SET @howGoodPrediction = @howGood
    RETURN
    END
    For me it looks like the rowcount should be valid. 
    In the second call the response is valid but with huge delay like 20 sec, but in the subsequent calls it's linearly reduced to about 1 sec. And if the next call happens about 30 sec later the response will have increase again to about 10 sec time lag and so
    on. Thank you for helping to solve the issue.

  • After 2 upgrades my phone mob is very slow, touch sence not functioning properly (very slow) also while opening call logs and phone book it takes few sec to opens,why?

    kindly look into this issue ASAP
    including my friend am the 5th person having issue after upgrade also D pad is timing is slow
    <Personal Information Edited by Host>

    With the URL of the feed one can check it in iTunes and submit it to FeedValidator as a first-line method of locating problems. It's nearly impossible to read right through a long feed's text looking for the one tiny error which may have borked it. With both URLs it's much easier to check things - including whether iTunes is using the feed the originator thinks it is (not always the case).
    If you've been getting quick updates in the Store you've been lucky; the Store checks feeds in some sort of rotation and so it depends where you happen to be in the cycle when you upload a change.

  • TS3795 Ever since I Upgraded to Maverick my MAC has been very slow which is very annoying.  Right now I am not home. So is there a number I can call so someone can help me with this issue?

    Is there a telephone number I can call after 7:00 p.m.?  I'm not at home and I need to call Support to help me speed up my MAC.  Ever since I upgraded to the Maverick my computer has been very slow and it's very annoying.

    you can call AppleCare.  In the US, the are open until 9PM EST.  Not free though if you do not have applecare: http://support.apple.com/kb/he57

  • TRFC call are very slow going to SIEBEL (TCP/IP RFC problem)

    Hi everyone,
    we have a problem when testing a connection to a TCP/IP RFC. this is also related to IDOCS being pushed to SIEBEL end. the logon time is very slow.
    not sure if this is on SAP end or on theirs. Could anyone give info on this? any would be appreciated.
    Logon
    48356 msec
    Transfer of 0 KB
    7 msec
    Transfer of 10 KB
    6 msec
    Transfer of 20 KB
    7 msec
    Transfer of 30 KB
    6 msec
    we are also seeing a lot of IDOCs (SM58) that have status Text as "Transaction Recorded".

    Hi,
    i've resolved problem 46029, but it remains loop problem in Oracle Bi Administration Tool. In addition, if in Answers I click on "Create Direct Request" I have results immediately. Otherwise if I submit a query on "Settings->Administration->Issue SQL, system goes in loop as in Administration Tool. At this point a begin to think that problem is at AWM creation cube step. In your opinion? What about your opinion? What other checks can I do, to resolve the situation?
    P.S. If I submit the same query given from NQSQuery.log under SQL PLUS, it goes in loop.
    P.S.2. I've tried all on a smaller cube. "Update Row Count" or "Retrieve Data" in Administration Tool now responds in acceptable time. I've deployed cube in Answers, and even in it , query returns in acceptable time. But it's a very small cube. For larger cubes situation is that explained. However, in this way, i think i can exclude all previous problems as cause of my issue. What do you think? However the problem remains. What can i do?
    My trouble is that I have still deployed a month ago a cube which responds in two seconds even to complex queries :-). Since that moment, performance has been always worst. The only change i've made has been of execute procedure to have multiple catalogs (and rpds) on same machine...
    Thanks
    Giancarlo
    Edited by: user5380662 on 4-mag-2010 6.55
    Edited by: user5380662 on 4-mag-2010 7.25

  • Date insertion from large XML document (clob) into relation table very slow

    Hi Everybody!
    I'm working with Oracle 9.2.0.5 on Microsoft Windows Server 2003 Enterprise Edition.
    The server (a test server) is a Pentium 4 2.8 GHz, 1GB of RAM.
    I use a procedure called PARITOP_TRAITERXMLRESULTMASSE to insert the data contained in the pXMLDOC clob parameter in the table pTABLENAME. (You can see the format of the XML document below). The first step on this procedure is to verify that the XML document is not empty. If not, the procedure needs to add a node in the document, in every <ROW> tag. This added node is named “RST_ID”. It’s the foreign key of each record. I can retrieve the value of each <RST_ID> node in an other table in which the data has been previously added (by the calling procedure). When each of the <ROW> elements has been treated, the PARITOP_INSERTXML procedure is called. This procedure uses DBMS_XMLSAVE.INSERTXML to insert the data contained in the XML document in the specified table.
    (Below, you can see the code of my procedures.)
    With this information, can you tell me why this treatment is very very very slow with a large XML document and how I can improve it?
    Thank you for your help!
    Anne-Marie
    CREATE OR REPLACE PROCEDURE "PARITOP_TRAITERXMLRESULTMASSE" (
    pPRC_ID IN PARITOP_PARC.PRC_ID%TYPE,
    pRST_MONDE IN PARITOP_RESULTAT.RST_MONDE%TYPE,
    pXMLDOC IN CLOB,
    pTABLENAME IN VARCHAR2)
    AS
    Objectif :Insérer le contenu du XML passé en paramètre (pXMLDOC) à la table passée en paramètre (pTABLENAME)
    La table passée en paramètre doit être une table ayant comme clé étrangère le champs "RST_ID" .
    (Le noeud RST_ID est donc ajouté à tous les document XML. Ce rst_id est
    déterminé à partir de la table PARITOP_RESULTAT grâce à pPRC_ID et
    pRstMonde fournis en paramètre)
    result_doc CLOB;
    XMLDOMDOC XDB.DBMS_XMLDOM.DOMDOCUMENT;
    NODE_ROWSET DBMS_XMLDOM.DOMNODE;
    NODE_ROW DBMS_XMLDOM.DOMNODE;
    vUE_ID PARITOP_RESULTAT.UE_ID%TYPE;
    vRST_ID PARITOP_RESULTAT.RST_ID%TYPE;
    nodeList DBMS_XMLDOM.DOMNODELIST;
    BEGIN
    BEGIN
    vUE_ID := 0;
    vRST_ID := 0;
    XMLDOMDOC := DBMS_XMLDOM.NEWDOMDOCUMENT(pXMLDOC);
    IF NOT GESTXML_PKG.FN_PARITOP_DOCUMENT_IS_NULL(XMLDOMDOC) THEN
    NODE_ROWSET := DBMS_XMLDOM.item(DBMS_XMLDOM.GETCHILDNODES (DBMS_XMLDOM.MAKENODE(XMLDOMDOC)),0);
    for i in 0..dbms_xmldom.getLength(DBMS_XMLDOM.getchildnodes(NODE_ROWSET))-1 loop
    NODE_ROW := DBMS_XMLDOM.ITEM(DBMS_XMLDOM.GETCHILDNODES(NODE_ROWSET), i) ;
    nodeList := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(DBMS_XMLDOM.makeelement(NODE_ROW) , 'UE_ID');
    IF vUE_ID <> DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0))) THEN
    vUE_ID := DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0)));
    --on ramasse le rst_id
    SELECT RST_ID INTO vRST_ID
    FROM PARITOP_RESULTAT RST
    WHERE RST.PRC_ID = pPRC_ID
    AND RST.UE_ID = vUE_ID
    AND RST.RST_MONDE = pRST_MONDE
    AND RST_A_SUPPRIMER = 0;
    END IF;
    GESTXML_PKG.PARITOP_ADDNODETOROW(XMLDOMDOC, NODE_ROW, 'RST_ID', vRST_ID);
    end loop;
    RESULT_DOC := ' '; --à garder, pour ne pas que ca fasse d'erreur lors du WriteToClob.
    dbms_xmldom.writeToClob(DBMS_XMLDOM.MAKENODE(XMLDOMDOC), RESULT_DOC);
    --Insertion du document XML dans la table "tableName"
    GESTXML_PKG.PARITOP_INSERTXML(RESULT_DOC, pTABLENAME);
    DBMS_XMLDOM.FREEDOCUMENT( XMLDOMDOC);
    end if;
    EXCEPTION
    […exception treatement…]
    END;
    END;
    The format of a XML clob is :
    <ROWSET>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6223</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>92.307692307692307</CMP_INDICESELECTION>
    <CMP_PVRES>94900</CMP_PVRES>
    <CMP_PVAJUSTE>72678.017699115066</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>72678.017699115095</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>72678.017699115037</CMP_PVAJUSTEMAX>
    <CMP_PV>148000</CMP_PV>
    <CMP_VALROLE>129400</CMP_VALROLE>
    <CMP_PVRESECART>4790</CMP_PVRESECART>
    <CMP_PVRHAB>101778.01769911509</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>148000</CMP_PVA>
    </ROW>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6235</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>76.92307692307692</CMP_INDICESELECTION>
    <CMP_PVRES>117800</CMP_PVRES>
    <CMP_PVAJUSTE>118080</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>118080</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>118080</CMP_PVAJUSTEMAX>
    <CMP_PV>172000</CMP_PV>
    <CMP_VALROLE>134800</CMP_VALROLE>
    <CMP_PVRESECART>0</CMP_PVRESECART>
    <CMP_PVRHAB>147180</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>172000</CMP_PVA>
    </ROW>
    </ROWSET>
    PARITOP_COMPARABLE TABLE :
    RST_ID NUMBER(10) NOT NULL,
    VEN_ID NUMBER(10) NOT NULL,
    CMP_SELMAN NUMBER(1) NOT NULL,
    CMP_UTILISE NUMBER(1) NOT NULL,
    CMP_INDICESELECTION FLOAT(53) NOT NULL,
    CMP_PVRES FLOAT(53) NULL,
    CMP_PVAJUSTE FLOAT(53) NULL,
    CMP_PVRHAB FLOAT(53) NULL,
    CMP_TVM FLOAT(53) NULL
    ROCEDURE PARITOP_INSERTXML (xmlDoc IN clob, tableName IN VARCHAR2)
    AS
    insCtx DBMS_XMLSave.ctxType;
    rowss number;
    BEGIN
    --permet d'insérer les champs du XML dans la table passée en paramètre.
    --il suffit que les champs XML aient le même nom que les champs de la table
    BEGIN
    insCtx := DBMS_XMLSave.newContext(tableName); -- get context handle
    DBMS_XMLSAVE.SETDATEFORMAT( insCtx, 'yyyy-MM-dd HH:mm:ss');--attention, case sensitive
    DBMS_XMLSAVE.setIgnoreCase(insCtx, 1);
    rowss := DBMS_XMLSAVE.INSERTXML(insCtx , xmlDoc);
    DBMS_XMLSave.closeContext(insCtx);
    EXCEPTION
    […]
    END;
    END;
    PROCEDURE PARITOP_ADDNODETOROW (
    XMLDOMDOC DBMS_XMLDOM.DOMDOCUMENT,
    NODE_ROW dbms_xmldom.DOMNode,
    NOM_NOEUD VARCHAR2,
    VALEUR_NOEUD VARCHAR2)
    AS
    --PERMET D'AJOUTER UN NOEUD AVEC 1 SEULE VALEUR DANS une ROW D'UN XML.
    --UTILE SURTOUT POUR LES CLÉS ÉTRANGÈRES
    domElemAInserer DBMS_XMLDOM.DOMELEMENT;
    NODE dbms_xmldom.DOMNode;
    NODE_TMP dbms_xmldom.DOMNode;
    BEGIN
    domElemAInserer := DBMS_XMLDOM.createElement(XMLDOMDOC, NOM_NOEUD) ;
    NODE := DBMS_XMLDOM.MAKENODE(domElemAInserer); --cast
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE_ROW,NODE);
    NODE_TMP := DBMS_XMLDOM.MAKENODE(DBMS_XMLDOM.CREATETEXTNODE(XMLDOMDOC, VALEUR_NOEUD ) );
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE,NODE_TMP );
    END;

    Hi Everybody!
    I'm working with Oracle 9.2.0.5 on Microsoft Windows Server 2003 Enterprise Edition.
    The server (a test server) is a Pentium 4 2.8 GHz, 1GB of RAM.
    I use a procedure called PARITOP_TRAITERXMLRESULTMASSE to insert the data contained in the pXMLDOC clob parameter in the table pTABLENAME. (You can see the format of the XML document below). The first step on this procedure is to verify that the XML document is not empty. If not, the procedure needs to add a node in the document, in every <ROW> tag. This added node is named “RST_ID”. It’s the foreign key of each record. I can retrieve the value of each <RST_ID> node in an other table in which the data has been previously added (by the calling procedure). When each of the <ROW> elements has been treated, the PARITOP_INSERTXML procedure is called. This procedure uses DBMS_XMLSAVE.INSERTXML to insert the data contained in the XML document in the specified table.
    (Below, you can see the code of my procedures.)
    With this information, can you tell me why this treatment is very very very slow with a large XML document and how I can improve it?
    Thank you for your help!
    Anne-Marie
    CREATE OR REPLACE PROCEDURE "PARITOP_TRAITERXMLRESULTMASSE" (
    pPRC_ID IN PARITOP_PARC.PRC_ID%TYPE,
    pRST_MONDE IN PARITOP_RESULTAT.RST_MONDE%TYPE,
    pXMLDOC IN CLOB,
    pTABLENAME IN VARCHAR2)
    AS
    Objectif :Insérer le contenu du XML passé en paramètre (pXMLDOC) à la table passée en paramètre (pTABLENAME)
    La table passée en paramètre doit être une table ayant comme clé étrangère le champs "RST_ID" .
    (Le noeud RST_ID est donc ajouté à tous les document XML. Ce rst_id est
    déterminé à partir de la table PARITOP_RESULTAT grâce à pPRC_ID et
    pRstMonde fournis en paramètre)
    result_doc CLOB;
    XMLDOMDOC XDB.DBMS_XMLDOM.DOMDOCUMENT;
    NODE_ROWSET DBMS_XMLDOM.DOMNODE;
    NODE_ROW DBMS_XMLDOM.DOMNODE;
    vUE_ID PARITOP_RESULTAT.UE_ID%TYPE;
    vRST_ID PARITOP_RESULTAT.RST_ID%TYPE;
    nodeList DBMS_XMLDOM.DOMNODELIST;
    BEGIN
    BEGIN
    vUE_ID := 0;
    vRST_ID := 0;
    XMLDOMDOC := DBMS_XMLDOM.NEWDOMDOCUMENT(pXMLDOC);
    IF NOT GESTXML_PKG.FN_PARITOP_DOCUMENT_IS_NULL(XMLDOMDOC) THEN
    NODE_ROWSET := DBMS_XMLDOM.item(DBMS_XMLDOM.GETCHILDNODES (DBMS_XMLDOM.MAKENODE(XMLDOMDOC)),0);
    for i in 0..dbms_xmldom.getLength(DBMS_XMLDOM.getchildnodes(NODE_ROWSET))-1 loop
    NODE_ROW := DBMS_XMLDOM.ITEM(DBMS_XMLDOM.GETCHILDNODES(NODE_ROWSET), i) ;
    nodeList := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(DBMS_XMLDOM.makeelement(NODE_ROW) , 'UE_ID');
    IF vUE_ID <> DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0))) THEN
    vUE_ID := DBMS_XMLDOM.GETNODEVALUE(DBMS_XMLDOM.GETFIRSTCHILD(DBMS_XMLDOM.ITEM(nodeList, 0)));
    --on ramasse le rst_id
    SELECT RST_ID INTO vRST_ID
    FROM PARITOP_RESULTAT RST
    WHERE RST.PRC_ID = pPRC_ID
    AND RST.UE_ID = vUE_ID
    AND RST.RST_MONDE = pRST_MONDE
    AND RST_A_SUPPRIMER = 0;
    END IF;
    GESTXML_PKG.PARITOP_ADDNODETOROW(XMLDOMDOC, NODE_ROW, 'RST_ID', vRST_ID);
    end loop;
    RESULT_DOC := ' '; --à garder, pour ne pas que ca fasse d'erreur lors du WriteToClob.
    dbms_xmldom.writeToClob(DBMS_XMLDOM.MAKENODE(XMLDOMDOC), RESULT_DOC);
    --Insertion du document XML dans la table "tableName"
    GESTXML_PKG.PARITOP_INSERTXML(RESULT_DOC, pTABLENAME);
    DBMS_XMLDOM.FREEDOCUMENT( XMLDOMDOC);
    end if;
    EXCEPTION
    […exception treatement…]
    END;
    END;
    The format of a XML clob is :
    <ROWSET>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6223</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>92.307692307692307</CMP_INDICESELECTION>
    <CMP_PVRES>94900</CMP_PVRES>
    <CMP_PVAJUSTE>72678.017699115066</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>72678.017699115095</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>72678.017699115037</CMP_PVAJUSTEMAX>
    <CMP_PV>148000</CMP_PV>
    <CMP_VALROLE>129400</CMP_VALROLE>
    <CMP_PVRESECART>4790</CMP_PVRESECART>
    <CMP_PVRHAB>101778.01769911509</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>148000</CMP_PVA>
    </ROW>
    <ROW>
    <PRC_ID>193</PRC_ID>
    <UE_ID>8781</UE_ID>
    <VEN_ID>6235</VEN_ID>
    <RST_MONDE>0</RST_MONDE>
    <CMP_SELMAN>0</CMP_SELMAN>
    <CMP_INDICESELECTION>76.92307692307692</CMP_INDICESELECTION>
    <CMP_PVRES>117800</CMP_PVRES>
    <CMP_PVAJUSTE>118080</CMP_PVAJUSTE>
    <CMP_PVAJUSTEMIN>118080</CMP_PVAJUSTEMIN>
    <CMP_PVAJUSTEMAX>118080</CMP_PVAJUSTEMAX>
    <CMP_PV>172000</CMP_PV>
    <CMP_VALROLE>134800</CMP_VALROLE>
    <CMP_PVRESECART>0</CMP_PVRESECART>
    <CMP_PVRHAB>147180</CMP_PVRHAB>
    <CMP_UTILISE>1</CMP_UTILISE>
    <CMP_TVM>1</CMP_TVM>
    <CMP_PVA>172000</CMP_PVA>
    </ROW>
    </ROWSET>
    PARITOP_COMPARABLE TABLE :
    RST_ID NUMBER(10) NOT NULL,
    VEN_ID NUMBER(10) NOT NULL,
    CMP_SELMAN NUMBER(1) NOT NULL,
    CMP_UTILISE NUMBER(1) NOT NULL,
    CMP_INDICESELECTION FLOAT(53) NOT NULL,
    CMP_PVRES FLOAT(53) NULL,
    CMP_PVAJUSTE FLOAT(53) NULL,
    CMP_PVRHAB FLOAT(53) NULL,
    CMP_TVM FLOAT(53) NULL
    ROCEDURE PARITOP_INSERTXML (xmlDoc IN clob, tableName IN VARCHAR2)
    AS
    insCtx DBMS_XMLSave.ctxType;
    rowss number;
    BEGIN
    --permet d'insérer les champs du XML dans la table passée en paramètre.
    --il suffit que les champs XML aient le même nom que les champs de la table
    BEGIN
    insCtx := DBMS_XMLSave.newContext(tableName); -- get context handle
    DBMS_XMLSAVE.SETDATEFORMAT( insCtx, 'yyyy-MM-dd HH:mm:ss');--attention, case sensitive
    DBMS_XMLSAVE.setIgnoreCase(insCtx, 1);
    rowss := DBMS_XMLSAVE.INSERTXML(insCtx , xmlDoc);
    DBMS_XMLSave.closeContext(insCtx);
    EXCEPTION
    […]
    END;
    END;
    PROCEDURE PARITOP_ADDNODETOROW (
    XMLDOMDOC DBMS_XMLDOM.DOMDOCUMENT,
    NODE_ROW dbms_xmldom.DOMNode,
    NOM_NOEUD VARCHAR2,
    VALEUR_NOEUD VARCHAR2)
    AS
    --PERMET D'AJOUTER UN NOEUD AVEC 1 SEULE VALEUR DANS une ROW D'UN XML.
    --UTILE SURTOUT POUR LES CLÉS ÉTRANGÈRES
    domElemAInserer DBMS_XMLDOM.DOMELEMENT;
    NODE dbms_xmldom.DOMNode;
    NODE_TMP dbms_xmldom.DOMNode;
    BEGIN
    domElemAInserer := DBMS_XMLDOM.createElement(XMLDOMDOC, NOM_NOEUD) ;
    NODE := DBMS_XMLDOM.MAKENODE(domElemAInserer); --cast
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE_ROW,NODE);
    NODE_TMP := DBMS_XMLDOM.MAKENODE(DBMS_XMLDOM.CREATETEXTNODE(XMLDOMDOC, VALEUR_NOEUD ) );
    NODE := DBMS_XMLDOM.APPENDCHILD(NODE,NODE_TMP );
    END;

  • MacBook Pro very slow to bring up homepage, won't open programs; likely related to attempt to upgrade Java software on the Parallels side, not successful because of low C drive capacity, recommended C drive compression not successful/completed.

    MacBook Pro very slow to bring up homepage, programs won't open; likely related to failure to upgrade Java on Parallels, told that C disc low capacity, disc compression recommended was unsuccesful/failed. Rebooting, battery removal hasn't helped. Can't open Systems Preferences. Suggestions?

    Linc, the resident dump guru, will probably be along in awhile and provide deeper insights, but here goes for now. I'm seeing an awful lot of warnings and messages from Chrome. Any chance you could lay off that browser for awhile and use Safari in the meanwhile? No red messages anywhere in the listing. Have you tried rebooting into Mountain Lion Recovery Mode to do a Repair Disk and Repair Disk Permissions? (Cause in spite of what your config tag says, the dump indicates you are running a ML kernel)

  • For tablet touch is very slow in firefox OS. Some times it is hanging. While dialing number to call it taking to much time. How to fix and debug this issue.

    For tablet touch is very slow in firefox OS. Some times it is hanging. While dialing number to call it taking to much time. How to fix and debug this issue. Waiting for your reply.

    Hi sb00349044,
    I'm sorry to hear that you are having problems with your Firefox OS device. Can you please specify the device Model and Version?
    If your device is one of the Firefox OS Tablets from the contribution program, please be aware that those builds are still being improved and ironed out. If that is the case, please follow the guidelines for the contributor program to report issues with the device.
    Thanks,
    - Ralph

  • Simple Soap Test, VERY SLOW with XP, only 5 calls per second !

    Hello,
    I'm just starting developing a web service. My first test shows a very slow performance of only about 5 calls per second:
    Windows XP client localhost -> Windows XP server: 2000 calls per second
    Windows XP client in VM on server maschine -> Windows XP server: 4,5 calls per second
    Windows XP client over 100 MBit LAN -> Windows XP server: 2000 calls per second: 4,5 calls per second
    Windows XP client over 1000 MBit LAN -> Windows XP server: 2000 calls per second: 4,5 calls per second
    So you might think, that is it, but - using identical jars:
    Mac OS X, 10.6 client -> Windows XP server: 880 calls per second
    Windows XP client -> Mac OS X 10.6 server: 4,5 calls per second
    So the problem seems to be the client setup on an Windows XP system.
    This is the service code:
    package net.metasafe.soapbenchmark.server;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService
    public class TestLib {
         private int count = 0;
         public TestLib() {
              // nothing to do
         @WebMethod
         public int div(int a, int b) {
              this.count++;
              if (b == 0)
                   throw new IllegalArgumentException("b must not be 0!");
              return a / b;
         @WebMethod
         public int getNumberOfCalls() {
              return this.count;
         @WebMethod
         public void resetCount() {
              this.count = 0;
    }This is the sevice publisher:
    package net.metasafe.soapbenchmark.server;
    import javax.xml.ws.Endpoint;
    class ServicesPublisher {
         public static void main(String[] args) {
              if (args.length != 2) {
                   System.out.println("2 Arguments required: <servername/IP> <port>");
                   return;
              String url = "http://" + args[0] + ":" + args[1] + "/services";
              System.out.println("Publishing TestLib service at url '" + url + "'.");
              Endpoint.publish(url, new TestLib());
    }This is the client code:
         public static void main(String[] args) throws MalformedURLException {
              if (args.length != 3) {
                   System.out
                             .println("3 Arguments required: <servername/IP> <port> <number of calls>");
                   return;
              int num = Integer.parseInt(args[2]);
              URL url = new URL("http://" + args[0] + ":" + args[1]
                        + "/services?wsdl");
              System.out.println("Conneting to service '" + url + "' .... ");
              QName qname = new QName("http://some_uri/",
                        "TestLibService");
              TestLibService service = new TestLibService(url, qname);
              TestLib tl = service.getTestLibPort();
              System.out.println("Connected !");
              // reset count
              tl.resetCount();
              System.out.println("\nPerforming " + num + " calls ...");
              long starttime = System.currentTimeMillis();
              int i;
              for (i = 1; i <= num; i++) {
                   tl.div(i, 2);
                   if (i % 100 == 0)
                        System.out.println(i);
              long t = System.currentTimeMillis() - starttime;
              System.out.println("Performed " + tl.getNumberOfCalls() + " calls in "
                        + (t / 1000.0f) + " seconds.");
              System.out.println("Calls per second: " + (num * 1000.0f / t));
              System.out.println("Done");
         }Any idea, why this is so slow, if the client runs on an Windwos XP (Pro) system ?
    Is there anything I have to be aware of when choosing the QName ?
    Best regards
    Marc

    Hello,
    no one any idea on for this ?
    How many calls do you get normally on Windows XP machines ?
    Regards
    Markus

  • Adobe has upgraded itself (now red) relates very slow at best,locks up and just does not work.Is the

    Adobe has upgraded itself( now red prompts ) and it operates very slow at best. it also locks up. Can I go back to old version or is there a fix?

    Seem to have one more issue, when in documents and wish to move document to a folder. If I am require to scroll down to find a folder adobe closes on its own. Do you have any thoughts on this issue/
    REGARDS

  • IPhone turning off during Phone Call with iOS 4 and very slow performance!!

    Ever since the update, my phone has been switching itself off during a conversation.
    Has any one else experienced this problem since the update???
    Do you have a solution, if so please post it and help me!!!
    Also, the phone has been going very slow.
    Keyboard appearing 20 seconds later, after opening a new note and overall slow performance.

    Thread here :
    http://discussions.apple.com/thread.jspa?threadID=2471090&tstart=15

Maybe you are looking for

  • Issue in CIF - Execute LUW again

    Hi ,    I created an integration model for stock transfer and when i try to activate it , it gives error. In SMQ1 (outbound queue from ECC to SCM) an entry is shown with status "RETRY" and it says "Command to tRFC/qRFC Execute LUW again" . In the que

  • "Unable to load URL" - SQL Server 2005 DB Web Service Connection

    Hi , I am using XCelsius version 5.0.0.99 to create dashboards connecting to SQL Server 2005. Find below the details of the steps - 1. Created a web service within SQL Server 2005 database. 2. Copied the WSDL URL. 3. In XCelsius 2008 -> Data Manager

  • Quicktime Player 50 secs delay on first film

    Hi all, I have the following problem (tested with Windows XP/Vista/7 - all show the same behaviour, all have the free edition of Quick Time Player, latest download) on several computers. Background: I use a self written program (Delphi) to start Quic

  • How do you freeze the tablix header row in an Excel export file in SSRS 2008?

    So this is totally killing me. I've found out how to make a tablix header row repeat on each page of a PDF export file in SSRS 2008 (which I won't even get started on because all I can say is that 2005 is way better), but I cannot figure out how to m

  • Smart Album to find No Description

    I am using iPhoto 9.2.3 on OS10.6.8. I used to be able to have a smart album with the condition "Description is" and I would leave the text field blank. This would give me all my photos that do not have any description. Now it does not select any pic