How to optimize xquery expression ?

hi,
i got berkeley db xml database with containers: dicom.dbxml and instancemetadata.dbxml.
dicom.dbxml contains documents as follow:
<?xml version="1.0" encoding="UTF-8"?>
<instance docid="dicom_1009">
     <dicom_item>
          <dicom_header>
               <dicom_tag group="0002" element="0000" vr="UL">194</dicom_tag>
               <dicom_tag group="0002" element="0001" vr="OB"/>
               <dicom_tag group="0002" element="0002" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
               <dicom_tag group="0002" element="0003" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
               <dicom_tag group="0002" element="0010" vr="UI">1.2.840.10008.1.2.1</dicom_tag>
               <dicom_tag group="0002" element="0012" vr="UI">2.16.840.1.113662.2.1.1</dicom_tag>
               <dicom_tag group="0002" element="0016" vr="AE">PHOENIXSCP</dicom_tag>
          </dicom_header>
          <dicom_body>
               <dicom_tag group="0008" element="0000" vr="UL">596</dicom_tag>
               <dicom_tag group="0008" element="0005" vr="CS">ISO_IR 100</dicom_tag>
               <dicom_tag group="0008" element="0008" vr="CS">ORIGINAL\PRIMARY\AXIAL</dicom_tag>
               <dicom_tag group="0008" element="0012" vr="DA">1999.05.05</dicom_tag>
               <dicom_tag group="0008" element="0013" vr="TM">10:52:34.530000</dicom_tag>
               <dicom_tag group="0008" element="0016" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
               <dicom_tag group="0008" element="0018" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
               <dicom_tag group="0008" element="0020" vr="DA">1999.05.05</dicom_tag>
               <dicom_tag group="0008" element="0021" vr="DA">1999.05.05</dicom_tag>
               <dicom_tag group="0008" element="0022" vr="DA">1999.05.05</dicom_tag>
               <dicom_tag group="0008" element="0023" vr="DA">1999.05.05</dicom_tag>
               <dicom_tag group="0008" element="0030" vr="TM">10:52:34.530000</dicom_tag>
               <dicom_tag group="0008" element="0031" vr="TM">10:52:34.530000</dicom_tag>
               <dicom_tag group="0008" element="0032" vr="TM">10:52:34.530000</dicom_tag>
               <dicom_tag group="0008" element="0033" vr="TM">10:52:32.510000</dicom_tag>
               <dicom_tag group="0008" element="0060" vr="CS">CTTR</dicom_tag>
          </dicom_body>
     </dicom_item>
</instance>
instancemetadata.dbxml contains documents as follow:
<?xml version="1.0" encoding="UTF-8"?>
<instancemetadata xmlns="imuba.med" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="imuba.med Instancemetadata.xsd">
          <name/>
          <notes/>
          <id>instancemetadata_1</id>
          <instanceid>dicom_1</instanceid>
          <createusername>dd</createusername>
          <createdate>Tue May 02 21:08:06 CEST 2006</createdate>
          <lastmodusername>dd</lastmodusername>
          <lastmoddate>Tue May 02 21:08:06 CEST 2006</lastmoddate>
     </instancemetadata>
and i got XQuery expression:
declare namespace n = "imuba.med";
declare variable $insCont external;
for $ins in collection(concat(concat("dbxml:containers/", string($insCont)),".dbxml"))/instance,
     $met in collection("dbxml:containers/instancemetadata.dbxml")/n:instancemetadata
where
$ins/dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060'] = "CTTR" and
$ins/@docid = $met/n:instanceid
return
<row>
{ $ins/@docid }
{ $met/n:name }
{ $met/n:notes }
{ $met/n:id }
{ $met/n:instanceid }
     { $met/n:createusername }
{ $met/n:createdate }
{ $met/n:lastmodusername }
{ $met/n:lastmoddate }
</row>
while i got 5000 documents in dicom container, the xquery execution time is close to 10 secs. i've tried to create indices using commands:
                    XmlIndexSpecification is = xcDicom.getIndexSpecification();
                    is.addIndex("", "docid", "unique-node-attribute-equality-string");
and
                    XmlIndexSpecification iss = xcIns.getIndexSpecification();
                    iss.addIndex("imuba.med", "instanceid", "unique-node-element-equality-string");
And then the execution time is nearly about 7-8 sec, but it's still big (the database contains only 5000 documents).
Have you any idea how to optimize it ? I suppose the index on element i'm using in the WHERE clause would be helpful (dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060']). Well, i haven't found concept how to add index on element which can be shown using xpath expression.
thanks for any help
Darek

Hi Darek,
First off, why not try adding these indexes to see what happens:
is.addIndex("", "dicom_tag", "node-element-equality-string");
is.addIndex("", "group", "node-attribute-equality-string");
is.addIndex("", "element", "node-attribute-equality-string");
Secondly, what storage model are you using? I would expect you to get better query times using a NodeContainer, with the DBXML_INDEX_NODES flag enabled.
Thirdly, your "instance" document is not very "XML" like, so you will struggle to get very good query times using that format. If you have control over the format of the document, I would suggest incorporating one or more of the "group", "element", and "vr" attributes into the name of the element - so that you will get multiple elements with different names, instead of one element name with multiple permutations of attributes. Selecting an element by name will always be faster than selecting it by some kind of value.
Let me know how you get on with these suggestions,
John

Similar Messages

  • How to use XQuery Exist() Function on a SSIS XML file

    I have a Package Inventory table that has an XML Column named CurrentPackageXML. This XML column contains the SSIS Package XML. I need to use the XQuery Exist() function to determine if the
    errorRowDisposition="IgnoreFailure" exists.
    Below I have a basic SQL statement, but I have no idea how to write the Correct XQuery Expression. In my example below, I just tried to see if the DTS:Name Property existed, but that XQuery Expression is invalid also. It is not what I need in the end, but
    I was just trying to get anything to work.
    Below my SQL, I have included a snip-it of the SSIS package XML where I can find the errorRowDisposition. It is to the far right, so you may have to scroll to the right to see it. I bolded the text so it is easier to find.
    Finally, once I have got a SQL statement that checks if errorRowDisposition exists = False, I need to check for every occurrence of  errorRowDisposition exists = False.
    Would there be an easier way to do this by converting the XML to a varchar(max) then searching for all instances of  errorRowDisposition exists = False?
    SELECT CurrentPackageXML.exist('/DTS:Executable/DTS:Property[DTS:Name]')
    FROM [dbo].[PackageInventory]
    <inputs>
    <input id="43" name="OLE DB Destination Input" description="" hasSideEffects="true" dangling="false" errorOrTruncationOperation="Insert" errorRowDisposition="FailComponent" truncationRowDisposition="NotUsed">
    <inputColumns>
    <inputColumn id="113" name="" description="" lineageId="110" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="95" mappedColumnId="0" />
    <inputColumn id="172" name="" description="" lineageId="167" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="94" mappedColumnId="0" />
    </inputColumns>
    <externalMetadataColumns isUsed="True">
    <externalMetadataColumn id="50" name="DateCreated" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="51" name="ProcessedCount" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="52" name="ErrorCount" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="90" name="AcknowledgementID" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="91" name="Date" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="92" name="FileSeqNumber" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="93" name="FileType" description="" precision="0" scale="0" length="50" dataType="str" codePage="65001" mappedColumnId="0" />
    <externalMetadataColumn id="94" name="FileName" description="" precision="0" scale="0" length="50" dataType="str" codePage="65001" mappedColumnId="0" />
    <externalMetadataColumn id="95" name="DateReceived" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    </externalMetadataColumns>
    </input>
    </inputs>
    Ryan P. Casey • <a href="http://www.R-P-C-Group.com">www.R-P-C-Group.com</a>

    Try this and let know what errors you get.  Note, this is a rough draft of one of a series of queries that I have started writing to document SSIS using SQL XQuery.  I read a file in my version (the one I tested) and get the results.
    -- Get the flat file destinations and their mappings
    with xmlnamespaces ('www.microsoft.com/SqlServer/Dts' as DTS
    ), compflow as (
    SELECT
    task.xml.value('@DTS:ObjectName', 'varchar(200)') as TaskName
    , task.xml.value('@DTS:ExecutableType', 'varchar(200)') as TaskType
    , task.xml.value('@DTS:refId', 'varchar(1000)') as TaskRefId
    --, task.xml.query ('.') as Node
    , component.xml.value ('@name', 'varchar(200)') as ComponentName
    , component.xml.value ('@refId', 'varchar(1000)') as ComponentRefId
    , component.xml.value ('@componentClassID', 'varchar(1000)') AS componentClassID
    --, component.xml.value ('count(inputs/input)', 'int') AS NumberOfInputs
    --, component.xml.value ('count(outputs/output)', 'int') AS NumberOfOutputs
    --, component.xml.value ('count(outputs/output[@isErrorOut="true"])', 'int') AS NumberOfErrorOutputs
    , component.xml.query('.') as ComponentNode
    FROM [dbo].[PackageInventory] pk
    cross apply pk.CurrentPackageXML.nodes('//DTS:Executable[@DTS:ExecutableType="Microsoft.Pipeline"]') as task (xml)
    OUTER APPLY task.xml.nodes('DTS:ObjectData/pipeline/components/component') as component (xml)
    WHERE [PackageInventory_ID] = 13
    , inputNode as (
    SELECT c.*
    , input.xml.value ('@name', 'varchar(200)') as InputName
    , input.xml.value ('@refId', 'varchar(1000)') as InputRefId
    , input.xml.value ('@hasSideEffects', 'varchar(1000)') as InputHasSideEffects
    , input.xml.value ('count(inputColumns/inputColumn)', 'int') AS NumberOfInputColumns
    , input.xml.value ('count(externalMetadataColumns/externalMetadataColumn)', 'int') AS NumberOfExternalMetadataColumns
    , input.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as InputerrorOrTruncationOperation
    , input.xml.value ('@errorRowDisposition', 'varchar(1000)') as InputerrorRowDisposition
    , col.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as InputColumnErrorOrTruncationOperation
    , col.xml.value ('@errorRowDisposition', 'varchar(1000)') as InputColumnErrorRowDisposition
    from compFlow c
    OUTER APPLY c.ComponentNode.nodes ('component/inputs/input') as input (xml)
    OUTER APPLY input.xml.nodes ('inputColumns/inputColumn') as col (xml)
    , inputAnal as (
    select
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,InputName
    ,InputRefId
    ,InputHasSideEffects
    , Null as IsError
    ,NumberOfInputColumns
    ,NumberOfExternalMetadataColumns
    ,InputerrorOrTruncationOperation
    ,InputerrorRowDisposition
    ,InputColumnErrorOrTruncationOperation
    ,InputColumnErrorRowDisposition
    , count(*) as NumRec
    from inputNode
    group by TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,InputName
    ,InputRefId
    ,InputHasSideEffects
    ,NumberOfInputColumns
    ,NumberOfExternalMetadataColumns
    ,InputerrorOrTruncationOperation
    ,InputerrorRowDisposition
    ,InputColumnErrorOrTruncationOperation
    ,InputColumnErrorRowDisposition
    , xoutputNode as (
    SELECT
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    , xout.xml.value ('@name', 'varchar(200)') as OutputName
    , xout.xml.value ('@refId', 'varchar(1000)') as OutputRefId
    , xout.xml.value ('@hasSideEffects', 'varchar(1000)') as OutputHasSideEffects
    , xout.xml.value ('@isErrorOut', 'varchar(1000)') as OutputIsError
    , xout.xml.value ('count(outputColumns/outputColumn)', 'int') AS NumberOfOutputColumns
    , xout.xml.value ('count(externalMetadataColumns/externalMetadataColumn)', 'int') AS NumberOfExternalMetadataColumns
    , xout.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as OutputerrorOrTruncationOperation
    , xout.xml.value ('@errorRowDisposition', 'varchar(1000)') as OutputerrorRowDisposition
    , col.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as OutputColumnErrorOrTruncationOperation
    , col.xml.value ('@errorRowDisposition', 'varchar(1000)') as OutputColumnErrorRowDisposition
    from compFlow c
    OUTER APPLY c.ComponentNode.nodes ('component/outputs/output') as xout (xml)
    OUTER APPLY xout.xml.nodes ('outputColumns/outputColumn') as col (xml)
    , outputAnal as(
    select
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,OutputName
    ,OutputRefId
    ,OutputHasSideEffects
    ,OutputIsError
    ,NumberOfOutputColumns
    ,NumberOfExternalMetadataColumns
    ,OutputerrorOrTruncationOperation
    ,OutputerrorRowDisposition
    ,OutputColumnErrorOrTruncationOperation
    ,OutputColumnErrorRowDisposition
    , count (*) as NumberOfRows
    from xoutputNode
    group by TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,OutputName
    ,OutputRefId
    ,OutputHasSideEffects
    ,OutputIsError
    ,NumberOfOutputColumns
    ,NumberOfExternalMetadataColumns
    ,OutputerrorOrTruncationOperation
    ,OutputerrorRowDisposition
    ,OutputColumnErrorOrTruncationOperation
    ,OutputColumnErrorRowDisposition
    select 'Input' as RowType, i.* from inputAnal i
    union all
    select 'Output' as RowType, o.* from outputAnal o
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • SSRS 2008 Work order report , in sub total donot want to add the 0 level in ( how to add the expression )

    working in Work order report, this report has different level , for example
    0 level transaction
    1 level transaction
    in subtotal don't want to add 0 level transaction,
    when I did the sub total it added all the level , so in sub total amount double up because of that
    how to add the expression so I can the level 0 take out from sub total , so it does not include in sub total
    can some one please help me with this
    thanks in advance

    Hi Simon_ Hou
    I tried the expr the way you suggested , it did not work  getting  error message,  the exp I added is below
    this the expression I added on sub total where is highlighted in Yellow,  under Cost amount column,
    I really appreciate the help
    =Sum(IIF(Fields!COLLECTREFLEVEL.Value=
    "0",0,Fields!CostAMOUNT.Value),"DataSet1")
    please see below my QUERY, can you please help and let me know what I did wrong in my exp
    SELECT        PRODTABLE.PRODID, PRODCALCTRANS.COSTGROUPID, PRODTABLE.QTYCALC, PRODTABLE.PRODSTATUS, PRODCALCTRANS.COSTAMOUNT,
                             PRODCALCTRANS.COSTMARKUP, PRODCALCTRANS.REALCOSTAMOUNT, PRODCALCTRANS.CALCTYPE, PRODTABLE.DATAAREAID, PRODCALCTRANS.KEY3,
                             PRODCALCTRANS.CONSUMPVARIABLE, PRODCALCTRANS.REALCONSUMP, PRODTABLE.ITEMID, PRODTABLE.SCHEDDATE, PRODTABLE.FINISHEDDATE,
                             PRODCALCTRANS.KEY1, PRODCALCTRANS.TRANSDATE, PRODCALCTRANS.QTY, PRODCALCTRANS.KEY2, PRODCALCTRANS.COLLECTREFLEVEL,
                             PRODCALCTRANS.LINENUM
    FROM            PRODTABLE INNER JOIN
                             PRODCALCTRANS ON PRODTABLE.PRODID = PRODCALCTRANS.PRODID AND PRODTABLE.DATAAREAID = PRODCALCTRANS.DATAAREAID
    WHERE        (PRODTABLE.PRODSTATUS = 7) AND (PRODTABLE.DATAAREAID = N'AR1') AND (PRODTABLE.ITEMID = @itemid) AND
                             (PRODTABLE.FINISHEDDATE >= @Paramfromdate) AND (PRODTABLE.FINISHEDDATE <= @Paramtodate)

  • How to Connect Airport Express to Existing Wireless Network (Client Mode)

    I am posting this for everyone tearing their hair out trying to connect the Airport Express to your own existing home wireless network. After spending 2 hours last night installing this on my father-in-law's home network, I hope to be able to save someone else the agony we went through.
    So here's the situation:
    Say you already have your own home network set up, and all you want is to be able to use AirTunes to play music off iTunes into your speaker system. And, you don't need the printer sharing capability nor creation of another wireless network (2 of the features of Airport Express). Then this solution is for you - read on.
    Unfortunately, Apple's user manual is very unclear how to connect Airport Express to your own network. When you look at the picture diagram they provide, they show Airport Express picking up its signal from another Apple-oriented base. This can make you think you need to buy another piece of hardware to make it work. DON'T If you read through the manual, the Support section here, etc., you will hear lots of talk about "Client Mode" - and that this is the only way to get it to work. Nice - but no one really tells you how to set up the Airport in client mode.
    Do yourself a favor, toss that user manual aside and run these steps.
    (Note: These directions assume your DSL/Cable Modem is hooked up to a wireless router or acts as its own wireless router)
    1. Get a cat5 Ethernet cable (anything but an orange cable - that's a crossover cable) like you would use to connect your PC to your router to pick up the Internet.
    2. Connect the Ethernet cable to the router on one end, and to the Airport Express unit on the other end.
    3. Plug in your Airport Express unit to the wall (this will not necessarily become its permanent location - you will be able to move it later). The light will glow solid Amber for about 30-45 seconds while it starts up, then blink Amber. At this point, the unit is ready to operate.
    4. Install the CD to the PC where your iTunes music is stored. This should be painless. Once you open the program, it should detect the Airport unit.
    5. At this point, the on-screen wizard will present you with your options, and walk you through the setup. This is much like the user manual describes - and you should be good to go form here forward.
    Some pointers:
    - When asked if you want to create a new network, join an existing network, or connect via Ethernet, choose the middle option for joining an existing network. You will need to know the name of your network, the password to connect to the network (if present), and the type of encryption used on the network (e.g. WEP, WPA, etc.). Side note, WPA is recommended, as it is a higher level of security than WEP. You will be able to configure the Airport Express unit to automatically login to your network.
    - I would recommend, when creating a password for the Airport Express unit, use the same password as your network, to avoid confusion.
    6. The very last step will ask you to save the settings to the Airport Express. Here's the kicker - when you save the settings, you are TRICKING the Airport Express into no longer acting as a network broadcaster, but instead being a "slave" to your own network. What do I mean? You will lose the connection from your PC to the Airport Express - an error message will pop up telling you the unit can no longer be found. While you might think you did something wrong, you actually were successful!
    7. Unplug your Airport Express, and disconnect the Ethernet cable from your router and the Airport unit. This will no longer be needed.
    8. Go to your desired location where you want to plug in your Airport Express unit. Before plugging it in, connect your Audio cable from the Airport Express to your audio receiver. Once that is connected, then plug in the Airport Express unit. The light will glow solid Amber for 30-45 seconds while it loads, and then will blink Amber for a brief period of time before turning solid GREEN. When this happens, you have successfully connected the Airport Express to your home network!
    9. Go back to your PC with iTunes. Open the Airport software - you should now have a listing for your Airport Express unit in the upper left. Click on this, and the wizard will guide you through connecting - you will need the password you created for the unit. You only need to go through this wizard once, and when finished, the software will tell you that can now use iTunes with your Airport unit.
    10. Open iTunes. On the lower right, you will see a dropdown for Speakers, and it should be defaulted to My Computer. Click on that drop-down, and you will see the name of your Airport unit. Click on that name, and now your music will broadcast to the Airport unit!
    11. Play a song in iTunes. Go to your audio receiver, and connect it to the channel for your external connection to the Airport Express unit. You should hear your music from iTunes. CONGRATULATIONS! =)
    I hope these instructions were helpful - I am happy to answer any questions, so feel free to contact me, *******************@*****.**.
    <Edited by Moderator>

    Thanks for the detailed directions. You are absolutely correct in stating that people should toss the user manual; it's pretty worthless. I have had a problem setting up my new Airport Express as I have described in an earlier post - http://discussions.apple.com/thread.jspa?threadID=1839873&tstart=45
    One quick question - does using your setup process set the AE up as part of a distributed network where the AE is acting as a wireless router where it is extending the range of your network? Or, is it simply a wireless connection to your stereo for iTunes? I am interested in having both, since my AE will be at the other end of the house from the main wireless router.
    Thanks

  • How to execute logical expression in JEP?

    Hi guys,
    I have a logical expression like,
    (5>3) AND (6>8) OR (7==7)
    Now how execute the above expression using JEP(JAVA Expression Parser)?
    can anyone help me?
    --Subbu                                                                                                                                                                                                                                                                                                                                                           

    Please go through the documentation for JEP
    http://www.singularsys.com/jep/doc/html/usage.html#gettingstarted

  • How to set up Express as a relay wireless base station ? System: Yosemite

    How to set up Express as a relay wireless station ?
    OS: Yosemite.
    Airport utility: 6.3.4
    Base station: Extreme, connected to modem.  Configured as "create a wireless network"
    Remote stations: Express, connected wireless as "extend a wireless network"
    Need relay station between Extreme and Express units.
    Airport utility doesn't give the "relay" option.

    Sorry, but Apple does not provide a "relay" option. The network can only be extended one time, not two.
    Move the remote station closer to the main station, or move the main station closer to the remote station, or move both closer together.

  • How well does the express work in a 2400 square foot home being on the top floor? us on the bottom floor

    How well does the express work in a 2400 square foot home being on the top floor? us on the bottom floor

    How well does the express work in a 2400 square foot home being on the top floor? us on the bottom floor
    As you might imagine, without knowing a ton of information about the actual construction of the walls and ceiling of your home.....how many walls and other obstructions would be in the signal path of each device.....and the distance between each device and the AirPort Express.....along with how many users would be online at one time or another and what activities they would be involved in......etc., it's really not possible to accurately predict what type of results you might achieve.
    The bottom line with any wireless installation is that you really won't know how effectively it will actually perform until you try it.
    My opinion would be that you will likely need to add an additonal AirPort Express to "extend" the wireless more effectively to the bottom floor. But again, the same things apply as above.

  • Eclipse XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.

    I created a wsdl based on a dbadapter in jdeveloper, imported into eclipse and created the biz and the proxy and uploaded to oracle service bus, it works fine,
    but happens now that i need to have a xsd and wsdl with business names and not table names, invented to create a xsd and wsdl file in jdeveloper
    and then went to eclipse and tried t xquery tranformation, but when i add the replace in the message flow in the filed in Variable : body and Expression i look for the xquery and in the binding trying to put
    $body/input parameter, get the following error [RouteNode1, Replace action] XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.
    what im doing wrong or its configuration
    thanks in advance sonia

    thanks
    ok have created a table with only in column varchar2(1)
    then the type object and the procedure to insert it works the proxy in the osb if i test it inserts
    now in jdeveloper i created an xml file with
    <?xml version="1.0" encoding="windows-1252" ?>
    <vessel>
    <barco>a</barco>
    </vessel>
    then i created a xsd based on this xml, and a wsdl based on the xsd
    in eclipse created a xquery transformation and selected source as the xsd created in adf and target the xsd input parameter, dont know why in the purple ball of the input parameter it puts a ?, an a f.
    then in the proxy xpath not writing anything in variable body and in the expression select the xquery and in binding select the parameter

  • IPod w/Cassette Adapter-How to Optimize Sound Quality?

    I have I believe a G2 iPod (15 GB), and I play it in my car using a cassette adapter. I've found that to keep the sound from degrading at above average volumes, I have to make some adjustments. One, I have to set the EQ to 'Bass Reducer'. Two, I have to make sure the volume on the iPod is at about 80%. If I go above that, the sound distorts. The lower you go below that, the more hissing you get w/ the playback. I also turn the 'Sound Check' setting on.
    Any other recommendations on how to optimize the sound quality when playing it through your vehicle sound system? Also, I'm thinking about getting a G5 unit (most likely the 4 GB Nano). Anyone have any feedback on whether I can expect better sound quality, in particular in my vehicle with the setup outlined above, by upgrading to the newer unit?

    Various Methods to Connect to a Car Stereo System, or Listen to Your iPod in the Vehicle
    Best:
    Direct connection via the dock connector or headphone jack of your iPod, to the mini-jack input (or AUX RCA input jacks) of your car stereo. Not many low/moderate-end cars have this feature yet, but it is becoming more popular. Some aftermarket auto stereo units may have this feature.
    There are also some after-market, moderate to fairly expensive direct interfaces, that hook into your existing car stereo to provide a high-quality, direct connection. Most will also power/charge the iPod. Pretty slick, but can be pricey ($80-$300). If money is no object, a clean way to go. Not very portable from car to car – if at all.
    http://logjamelectronics.com/ipodproducts.html
    http://www.myradiostore.us/auxadapters/blitzsafe/blitzsafe-m-link-ipod-interface .html
    http://www.theistore.com/ipod2car.html
    http://www.mp3yourcar.com/
    Better:
    Connect your iPod to a cassette adaptor and play your tunes through your car's cassette player. Some new cars no longer come with a cassette player, so it may not be an option. It will provide even better audio quality if you can run the audio feed out of the dock connector (see the SendStation link below). Can be portable between cars that have a cassette player and also be used in your home cassette system. $5 to $20 for the adaptors, with large variations in quality (even with the same model).
    Good:
    Attach an FM transmitter to your iPod and play the tunes through an unused FM station. Convenient, but wireless FM transmitter signals are susceptible to static and outside interference, and can vary in strength and quality depending on your location. Some noticeable degradation and distortion, depending on the quality of the transmitter, the sensitivity of your ears and the airwave congestion in your area. Highly portable between cars, and may be used in a home system. FM transmitters that need to be plugged into a DC auto jack may not work in a home environment (without some sort of adaptor). You can pay from $15 to more than $80 for some of these.....but for FM quality audio, how much is too much?
    Marginal:
    Attach an external speaker system to the iPod and play it in the car. Workable, but not too good - unless you spring for a $300+ Bose (or similar) system. But why? Only if your vehicle has no Stereo system, perhaps.
    Brave Techno-Geek:
    This site gives some directions on adapting a car stereo by yourself. Risky, but it has been successfully accomplished by a forum member. Fairly inexpensive....unless you screw it up.
    Whichever you choose, power the iPod through your car’s DC power -- either from a power adapter, or as part of the combined audio adaptor. Have a method to secure the iPod to the dash/console/etc. See the reviews for all the various accessories at the iLounge
    You will also get better audio output if the dock connection plug is used, rather than the headphone jack. See Sendstation for a novel adaptor called a PocketDock. Others types are also available via this site.
    I have read positive and negative reviews of each method, and within methods there are great variations in performance of different manufacture's systems – and peoples’ opinions of their performance. Some cassette adaptors/FM transmitters work poorly, some better.
    FWIW: I have the iTrip Mini & the Newer Technology RoadTrip!+ FM transmitters, a Belkin cassette adaptor (used both with & w/out the PocketDock) and two vehicles with the BlitzSafe direct interface. Using the same song in the same car, I found that the FM transmitters worked, but not as good as the cassette adapter via the headphone jack. Using the PocketDock on the cassette adapter resulted in a significant audio quality improvement. As expected, the Blitzsafe direct connect was exceptionally better than everything else: less tinny, a more warmer/richer sound, and close to true CD quality.

  • How to optimize an aggregate query

    There is a table table1 having more than 3 lacs of records. It has an index on a column say col1. when We issue a simple query select count(col1) from table1, it is taking about 1 minute in exectuion even if index is there. can anyone guide me on how to optimize it

    More information about the problem.
    SQL> select count(r_object_id) from dmi_queue_item_s;
    COUNT(R_OBJECT_ID)
    292784
    SQL> show parameter optimizer
    NAME TYPE VALUE
    optimizer_dynamic_sampling integer 1
    optimizer_features_enable string 9.2.0
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_max_permutations integer 2000
    optimizer_mode string CHOOSE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 16
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL> select sname,pname,pval1,pval2
    2 from sys.aux_stats$;
    no rows selected
    SQL> explain plan for
    2 select count(r_object_id) from dmi_queue_item_s;
    select count(r_object_id) from dmi_queue_item_s
    ERROR at line 2:
    ORA-02402: PLAN_TABLE not found

  • Can't figure how to remove the Express Rail Kit X8029A-EZ

    I feel really stupid for asking this, but I can't figure out how to remove the express rail kit from my rack. I got it installed in a snap, but I can't figure out how to remove it. I think the model number is X8029A-EZ, but I can't find any docs on it.
    Suggestions?
    thanks,
    mk

    there's a seesaw like piece that locks the rails in. you needed to reach it and push the side closest to the front down to release. if you have a server above it or below it, it is very difficult. some older, wider, or otherwise non-conforming racks also make release difficult. if you can find a flat piece of metal, you could push it in from the back and pull it towards the center of the cabinet. i've been successful with this method a couple of times. the directions say you can also use a #0 size screwdriver and release from the front by sticking it through middle and pushing the screwdriver towards the outside of the cabinet. i was not successful with this method.

  • How to optimize this sql by writing MINUS function.

    Hi all,
    how to optimize the sql by writing MINUS function.
    these are my tables
    1. CREATE TABLE POSTPAID
    RECORD VARCHAR2(2000 BYTE),
    FLAG NUMBER
    Record format:
    Mobile no in 1:10 of that length
    2. CREATE TABLE SUBSCRIBER
    PHONE_NO VARCHAR2(10 BYTE)
    My requirement is following sql need write using ‘minus’ as this one is very slow
    select record record from POSTPAID where substr(record,9,10) NOT in (select PHONE_NO from SUBSCRIBER)
    Thanks

    Why are you very particular about using "MINUS". You can optimize the sql by using "NOT EXISTS" instead of "NOT IN" as below:
    SELECT RECORD FROM POSTPAID A WHERE NOT EXISTS (SELECT 1 FROM SUBSCRIBER B WHERE SUBSTR(A.RECORD,9,10) = B.PHONE_NO)

  • How to optimize this select statement  its a simple select....

    how to optimize this select statement  as the records in earlier table is abt i million
    and this simplet select statement is not executing and taking lot of time
      SELECT  guid  
                    stcts      
      INTO table gt_corcts
      FROM   corcts
      FOR all entries in gt_mege
      WHERE  /sapsll/corcts~stcts = gt_mege-ctsex
      and /sapsll/corcts~guid_pobj = gt_Sagmeld-guid_pobj.
    regards
    Arora

    Hi Arora,
    Using Package size is very simple and you can avoid the time out and as well as the problem because of memory.  Some time if you have too many records in the internal table, then you will get a short dump called TSV_TNEW_PAGE_ALLOC_FAILED.
    Below is the sample code.
    DATA p_size = 50000
    SELECT field1 field2 field3
       INTO TABLE itab1 PACKAGE SIZE p_size
       FROM dtab
       WHERE <condition>
    Other logic or process on the internal table itab1
    FREE itab1.
    ENDSELECT.
    Here the only problem is you have to put the ENDSELECT.
    How it works
    In the first select it will select 50000 records ( or the p_size you gave).  That will be in the internal table itab1.
    In the second select it will clear the 50000 records already there and append next 50000 records from the database table.
    So care should be taken to do all the logic or process with in select and endselect.
    Some ABAP standards may not allow you to use select-endselect.  But this is the best way to handle huge data without short dumps and memory related problems. 
    I am using this approach.  My data is much more huge than yours.  At an average of atleast 5 millions records per select.
    Good luck and hope this help you.
    Regards,
    Kasthuri Rangan Srinivasan

  • How to optimize code for getting list of portal GP erroneous processes

    Hello,
    In our Web Dynpro application for Java we got the list of GP processes with status Erroneous which match the following criteria (initiator, processName, blockName, actionName, startDate, endDate, instanceName, actionProcessor) by loop of all portal users. The problem is that it takes too much time for execution. In example with 200 users it takes about 5 min. Any idea how to optimize execution?
    <br>
    <br>
    <br>
    <br>
    public java.util.List getListOfUser( )  {<br>
        //@@begin getListOfUser()<br>
         List<IUser> usersList = null;<br>
            try {<br>
              ISearchResult uniqueIDs =  UMFactory.getUserFactory().getUniqueIDs();     <br>
              if (uniqueIDs.getState() == ISearchResult.SEARCH_RESULT_OK)     <br>
              {     <br>
         usersList = new ArrayList<IUser>();     <br>
                 for (Iterator<?> it = uniqueIDs; it.hasNext();) {     <br>
                     usersList.add(UMFactory.getUserFactory().getUser((String)it.next()));     <br>
         }     <br>
               }       <br> 
            } catch (UMException ex) {     <br>
            msgMngr.reportException("Unable get list of users!");     <br>
         }          <br>
         return usersList;     <br>
        //@@end     <br>
      }     <br>
    <br>
    <br>
    <br>
    public void getErrorProcessAllUser( )  {     <br>
    IUser currentUser = null;     <br>
              try {        <br>
                    if (wdContext.nodeUsers().currentUsersElement().getLogonId() == null){     <br>
                         List<IUser> userList = getListOfUser( );     <br>
    <font color="red">//{this loop is extremely slow</font>     <br>
                             for(int n = 0; n < userList.size();n++){       <br>
                                     String logonID =  userList.get(n).getUniqueName();     <br>
                                    currentUser = UMFactory.getUserFactory().getUserByUniqueName(logonID);     <br>
                                  viewProcessDetails(currentUser);     <br>
                         }     <br>
    //}     <br>
                     }else{     <br>
                         currentUser = <br>     UMFactory.getUserFactory().getUserByUniqueName(wdContext.nodeUsers().currentUsersElement().getLogonId());
                         viewProcessDetails(currentUser);<br>
                     }<br>
                   } catch (UMException e) {<br>
                    msgMngr.reportException("No user with this logonId!");<br>
                   }<br>
    }<br>
    <br>
    <br>
      public void viewProcessDetails( com.sap.security.api.IUser currentUser )  {<br>
        //@@begin viewProcessDetails()<br>
             List<IProcessInfoElement> bindableResult = new ArrayList<IProcessInfoElement>();<br>
                 try {   <br>
                    IGPRuntimeManager rtManager = GPProcessFactory.getRuntimeManager();<br>                           
                    IGPWorkItem[] workItems = rtManager.getWorkItems(GPWorkItemStatus.WORKITEM_STATUS_COMPLETED_BY_SYSTEM,<br> GPContextFactory.getContextManager().createUserContext(currentUser));<br>
                     for(int i = 0; i < workItems.length; i++){<br>
                               IGPProcessInstanceInfo processInfo =  rtManager.getProcessInstanceInformation(workItems<i>.getProcessID(), currentUser);<br>
                               if(GPBlockInstanceStatus.getStatusForCode(processInfo.getStatus()) == GPBlockInstanceStatus.BLOCK_INSTANCE_STATUS_ERROR){ <br>
                                    IGPProcessInstance instance = rtManager.getProcessInstance(processInfo, GPContextFactory.getContextManager().createUserContext(currentUser));  <br>                           
                                    IGPActivityInstance[] blocksList = instance.getChildrenInformation();    <br>
                            for(int j = 0; j < blocksList.length; j++){    <br>
                                     IGPActivityInstance[] actionsList = ((IGPBlockInstance)blocksList[j]).getChildrenInformation();
                                for (int k = 0; k < actionsList.length; k++){<br>               
          DO SOMETHING

    got the answers ..
    we have use IndexedRecord instead of MappedRecord
                   IndexedRecord input = rf.createIndexedRecord("input");
                   boolean flag = input.add("/FolderpathValue");
                   flag = input.add("CampusCodeValue");
    <b>Thanks</b>,
    Saravanan

  • Property Correlation XQuery Expression

    Would like to know about Property Correlation XQuery - Expression to create order Item dependency
    It is for introducing a third, site-based decomposition stage - SyncCustomer.SiteA,SyncCustomer.SiteB,SyncCustomer.SiteC,Provisioning.SiteA,Provisioning.SiteB,and so on.

    Well, interesting try. Oracle has suggested to keep a mapping (in a XML or in database) between logical and physical values of destinations, you are trying to route, in OSB itself and to query it at runtime to get the actual value of destination. Please refer -
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1081507
    What error do you get when you directly use the X-Path in Dynamic Routing expression?
    Regards,
    Anuj

Maybe you are looking for