How to create the index suitable for my xml...

Hi all... I have an xml attachment saved in an XMLType column in a table that is stored in binary xml secure.
I want to use XQuery to navigate the xml code and push the results in a normal table.

All of this works, I have a question if all the xmlindex I want to create.
I want to create a xmlindex so that the plan of the explain command would be cheaper.
If I remove the where XQuery bit the explain command comes with a cost of 32, but if I use the where the bits of the cost are 223000!
Removal of the index makes no difference if the index is not used here.

What index to use here and especially how he specify?
I read something on the structured and unstructured indexes, but I did not understand what and how to use them.

If someone could help that would be great.

A point, however: the xml used for the explain command is much longer; It contains 48385 lines instead of the rows listed here.
Ad al of them would make the post a little longer...

table and index:
 CREATE  TABLE XML_NAME_CLOB ( 
        OS_FILENAME varchar2(255),
        ORA_DIR varchar2(255),
        NLS_CHARSET_ID varchar2(255),
        XML_DATA XMLType,
        LOAD_DATE date,
        AUDIT_ID number)
    XMLTYPE xml_data STORE AS BINARY XML
    ;

 CREATE INDEX po_xmlindex_ix ON XML_NAME_CLOB (xml_data) INDEXTYPE IS XDB.XMLIndex;    
Used XML short-circuited for brevity
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:o="urn:schemas-microsoft-com:office:office"
          xmlns:x="urn:schemas-microsoft-com:office:excel"
          xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:html="http://www.w3.org/TR/REC-html40">
 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Author>def</Author>
  <LastAuthor>def</LastAuthor>
  <Created>2011-10-06T15:05:31Z</Created>
  <Company></Company>
  <Version>11.9999</Version>
 </DocumentProperties>
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>12525</WindowHeight>
  <WindowWidth>24795</WindowWidth>
  <WindowTopX>120</WindowTopX>
  <WindowTopY>30</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
  <Style ss:ID="s21">
   <NumberFormat ss:Format="#,##0"/>
  </Style>
 </Styles>
 <Worksheet ss:Name="Sheet1">
  <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="127" x:FullColumns="1"
         x:FullRows="1">
   <Column ss:Width="63.75"/>
   <Column ss:Width="58.5"/>
   <Row>
    <Cell ss:StyleID="s21"><Data ss:Type="String">budgethouder</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="String">documenten</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ABU</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">24</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ABJ</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">995</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ACC</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">2754</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ADD</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">224</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ALG</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">310</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">AMM</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">125</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">WEN</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">106</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">YAO</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">263</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ZAG</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="Number">0</Data></Cell>
   </Row>
  </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <Selected/>
   <Panes>
    <Pane>
     <Number>3</Number>
     <ActiveRow>4</ActiveRow>
     <ActiveCol>3</ActiveCol>
    </Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
 <Worksheet ss:Name="Sheet2">
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
 <Worksheet ss:Name="Sheet3">
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
</Workbook>
Select with xquery
 select tabel.budgethouder, tabel.documenten
from XML_NAME_CLOB,
      xmltable(
              XmlNamespaces('urn:schemas-microsoft-com:office:spreadsheet' as "ss",
              DEFAULT 'urn:schemas-microsoft-com:office:spreadsheet' ),
               'for $i in /Workbook/Worksheet[1]/Table/Row[position()>1] 
                where 
                  /Workbook/Worksheet[1]/Table/Row[1]/Cell[1]/Data/text()=''budgethouder'' and
                  /Workbook/Worksheet[1]/Table/Row[1]/Cell[2]/Data/text()=''documenten'' and
                  /Workbook/Worksheet[1]/@ss:Name=''Sheet1''
                return $i '
                PASSING xml_data 
                columns budgethouder varchar2(100)  PATH 'Cell[1]/Data/text()',
                        documenten varchar2(100)    PATH 'Cell[2]/Data/text()'
                        
              ) tabel
        where audit_id = 12;   
Published by: MichaelR64 on 7-oct-2011 16:53

Published by: MichaelR64 on 8-oct-2011 18:05

You saw the answer on my blog? ;)

begin
  dbms_xmlindex.registerparameter(
    'ext_smldata_xtb_param'
  , 'XMLTable ext_smldata_xtb ... big text content here ... '
  );
end;
/

create index ext_smldata_sxi on ext_smldata (object_value)
indextype is xdb.xmlindex parameters ('PARAM ext_smldata_xtb_param')
;

Tags: Database

Similar Questions

  • How to create the firewall rule for Windows 7 for javaw.exe?

    How to create the firewall rule for Windows 7 for javaw.exe? The application path differs from the new versions and user profiles. Is there generic symbols allowed for example asterisk?

    Hello

    I recommend you to send the request to another Department for assistance:

    Security in Windows 7

    http://social.technet.Microsoft.com/forums/en/w7itprosecurity/threads

    I hope this helps.

  • How to create the file .bar for production mode?

    Hello

    How to create a file .bar for production mode?

    When Flash Builder, I configure my project for the mode of Production, he asks me a RIM certificate that must be registered (and then need a CSI file?). Where can I find this file?

    Thank you

    Signature of application information has not yet been published.  You can submit your application unsigned.  In addition, in FB4, in the Properties window of the project, under the Flex compiler, you can add

    -debug = false

    to compile without debugging information.

    Otherwise, .bar file creation is done in a regular compilation with BB CLI package.

  • How to create the constructor function for a pl/sql table?

    I created a PL/SQL type as table below:

    create or replace type typ_tbl_des_text is table of the typ_tof_des_text

    OK so far, but I would like to have a constructor function which would be subject to validations and raise_application_error when a validation condition is not met.

    How to do this?

    The typ_tof_des_text that I created with a constructor function, so that the record-level validation are performed in the constructor. And I think the postings between several records shall be made in a constructor for typ_tbl_des_tex, but cannot figure out how to create such a constructor.

    BEDE wrote:

    So, if I have understood correctly, to a plsql table type, I can't have a member procedure. Or can I? I mean, just as for a type of failure I can have one or more constructors and possibly several procedures of Member.

    For the standard tables in PL/SQL, you will need to create your own API (using procedures and functions) to handle beyond the basics provided by the language. No constructors and methods as it is no o - o.

    After thinking a little deeper, I reformulate what I said earlier and actually wants to have a member procedure called add_item, who would be first to check if an item with a key value exists and, if so, it would be up-to-date and so not only extend the plsql table.

    Two options.

    As we already mentioned, an associative array can be considered - note however that this structure of table has name-value pairs.

    Another method is to use a TWG (global temporary table). You define the structure of the once initial table. When a session uses the structure of the table, private copying is instantiated for this session. When the session ends, this copy is destroyed. The table is a temporary structure for this session only.

    It can include indexes and so on – which means you can use the constraints of primary keys, unique indexes, secondary indexes and so on.

    TWG scales are much better than collections or arrays that require a PGA (expensive private server) memory. In addition, SQL can be used natively against a GTT - unlike the arrays and collections.

  • How to create the shared library for linux real-time target in labVIEW Windows?

    I use myRIO running linux in real time. In my project, I need to pack some C code, so I tried the node library function call.

    I know that I should use the tools compile cross - compile linux on Eclipse to compile c code in linux .so library. But the problem is that call library function node does not recognize the .so file because my labVIEW runs on a Windows PC.

    What should I do to fix and how to combine C code with labVIEW during programming for devices shipped as myRIO?

    Basically, you must also create a Windows DLL that exports the same functions. These functions can be empty stubs if you do not want to run the code correctly on Windows, otherwise you will need to consider how to implement the equivalent functionality on the Windows API.

    Then you can write in your node library call as the name of the library ". "*" and the name of the shared library Windows ".dll" while the Linux version is called "name of your library > .so". LabVIEW will replace the * after the comma in the name of library with everything that is the preferred extension shared library for the platform it is running on and therefore load the right shared library.

    Alternatively you can wrap call all the nodes of the library in a structure that contains the node library in the case of Linux RT and all what you want to run on other platforms in the case of default or a case of specific platform, call the conditional compilation.

  • How to create the trigger insert for DBSequence? 10.1.3 Jdev

    Hello.. I m trying to create a field DBSequence and I read you need to create an insert on it s trigger...
    This trigger is in the database or in Jdeveloper... If it s in Jdeveloper how can I do this?
    Thank you.

    User,

    You can create the trigger in the database or write code in the class of java feature object to do.

    You can have a reading in the developer's Guide to the ADF for forms/4GL developers 6.6.3.8 section to know more about the trigger of the DB. 9.4.1.2 section talking about how to do java EO class if you prefer this method.

    John

  • How to create the file .bat for auto archive locally

    Hi, can someone guide me on creating a file bat for auto archive locally and a volume mounted, daily for an external HD operating system Windows server 2003 stnd?

    Thank you

    Here is the Vista Forums.

    http://TechNet.Microsoft.com/en-us/WindowsServer/default.aspx

    Try the repost in the communities of server above.

    They will help.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to create the channel listens for XML/web services line

    Hi, I'm new to B2B 11 g, would ask tht,.

    I followed the tutorial of B2B using generic file and it works fine. However,.
    If I want to receive the trading partner thought web XML server, how can I configure the channel look, what protocol to use.


    And can any1 kindly refer me to any link or info?

    Thank you.

    However... If remote partner is going to send me thought web services and no thought record, should I do something on my B2B? has I need specific, any channel listen extra?

    N ° no additional configuration is required to receive files via HTTP. Just ask your TP to post files on one of the below URL.

    http://hostname:soa_server_port/b2b/httpReceiver or http://hostname:soa_server_port/b2b/transportServlet

    If you just want to test your B2B, if it is correctly configured best way is to have another facility of B2B (may be a new domain) who will laugh at your configuration TP. This configuration of B2B send message to your B2B on HTTP (on one of the above URL) and see if gets treated with success.

    If you just want to test if your B2B is ready to accept messages over HTTP, then go to the URL above browser and make sure that you see below message-

    "B2B Server is ready to accept messages HTTP from the trading partner.

    Kind regards
    Anuj

  • How to create the "clear key" for the control panel simple search

    Hello

    I have a QueryRN with mode of construction research = none.
    I would like to add a button 'Clear' on the search panel simple I know is there any settings / need to create the clear key caraa?

    Please share with me the method to create the clear key... Thanks :)

    pls help...

    Hello

    Use below a

    OAMessageLovInputBean LovBean = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("Item");
    if(LovBean!=null)
    {
       LovBean.setValue(pageContext,null);
    }
    

    Kind regards
    GYAN

  • Help! How to create the barrier wall for maze game

    Hi - I'm working on a simple maze program that has the ball which is controlled from the top down. left, right arrow keys.  I made an image of maze in Photoshop and it entered, the Flash CS6 and CC (AS3). I made a barrier wall called wallDet1_mc to test before creating other obstacles of wall. It does not work. The ball passes through the wall every time that I test it.  Any help on this would be greatly appreciated.  If anyone has a maze of basic with arrow keys control when their object do not cross over the wall, please let me know how to do this. Thank you.

    Yes, this problem is quite difficult. I have some ideas how to attack then.  Please try to understand it with me.

  • How to create the batch file for configuring windowos?

    Like how to add running exe/service turn on DEP Windows batch file (.bat).
    My computer > etiquette > advance setting > setting > prevention of execution of data (DEP) > add > ok.

    Hello

    The question you posted would be better suited to the MSDN Community. Please visit the link below to find a community that will support what ask you

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • How to create the ejb - jar file. XML

    I would like to generate ejb - jar EJB 3 with Jdeveloper. I used to enter environment entries using EJB 2.0 properties. Please let me know how to do this with EJB 3 session EJB. Right click on the EJB, I cannot see the option properties.

    Thank you

    Kenny

    Hello

    Right click on your model project-> New-> General-> deployment descriptors->-> ejb Java EE deployment descriptor - jar.Xml.

    Pedja

  • create the code lock for computer book note

    How to create the code lock for computer book notices

    Enter the BIOS, select the Security tab and set the power on password.

    I strongly recommend that you write the power on password and put somewhere safe. If you have forgotten the password turned on, you will find that you will need to send your laptop to be repaired by HP. This is not free of cost. Once a button inside the laptop password reset are over.

    I can't be more precise, as you have not identified your laptop with its full product name or product number.

  • How to create your default desktop for all / some users?

    Using Vista business I want to create a desktop computer by default for all users. How can I do this?

    I have a machine that has a dozen accounts. Can I retroactively apply this desktop computer to some existing accounts?

    Thanks for thehlp

    Joe

    Discussions on the topic "Change the profile by default in Vista"
    http://social.technet.Microsoft.com/forums/en-us/itprovistasetup/thread/62ed66ad-71cd-43C3-83c0-5303d77176b8/
    by Heather

    "How to make a standard profile w / user by default.
    http://forums.techarena.in/Vista-Help/1065679.htm
    by Darrell Gorter [MSFT]

    How to create the default profile for Vista
    http://help.Lockergnome.com/Vista/create-Vista-default-profile--ftopict15825.html
    Darell Gorter mentioned here only taken methods supported to change the default user profile:
    "How to customize the local default user profile when you prepare a
    image of Windows Vista, Windows Server 2008, Windows XP, or Windows Server 2003"
    http://support.Microsoft.com/default.aspx?scid=KB; EN-US; 959753
    but when you go on the link says the Tip system is not for Vista, on Windows Vista title is missing.

    I hope I could help

  • How to create the default user interface is newly added to the columns in the table

    I added the new columns to the database table existed who got the default values for the user interface to the columns existed.

    How to create the default UI for the new columns.

    I couldn't see the newly added columns change the default UI (object browser-> database-> default UI - Edit-> Table).

    Using APEX 5.0.3

    Can you please help.

    Thank you.

    Find the option "Synchronize with database" under tasks on the interface's default user - Edit

Maybe you are looking for

  • function arraytoimage

    According to MAX I development vision 8.5.1 installed but I can not find Imaq image Board.  I know that used to be part of the package.  What have I not installed?

  • Can I use a USB Flash drive?

    Windows XP Professional - SP3 - Version 2002 Can I use a USB Flash drive to increase memory? My machine has 512 MB of RAM, and I have a 1.80 GHz CPU Celeron (r) processor. From what I've researched, because my OS is Windows XP and I have 512 MB of RA

  • unwanted F1 start screen

    When the restart/stop my vista, I would like for her to start with the windows login screen and password, like when I first bought, but it begins with a screen black f1, how, please help?

  • Hard drive on Inspiron 620 begins to Miss - issues

    I am a year out of warranty and my Seagate 1 TB drive begins to run out.  When I ran the diagnostic, I have errors during a targeted reading test (error code: WHD20-8OT), which suggests to me it's time to start looking for a new drive.  Nice to give

  • WAP 321 - no way to disable the WPS

    Community salvation. I have 2 WAP321 running in a Cluster (WAP321 Station 1 and 2 of the WAP321 Station). Both are on the same Firmware 1.0.6.2. On the 1. Station of WPS is disabled and the 2. Station of WPS is enabled (see wap321 - s1_info.png and w