Help with value index

Hi,
We need some help getting our queries to join on V() type indexes, so we think.
Here is our situation: We are on DBXML 2.2.13, and not quite ready to upgrade.
We are trying to do a join of 2 or sequences each 5000 in length.
Based on our reading of the query plan, the joins are not using the V(...) type index on both sides of the join.
One side will use a V() index, the other uses a P() regardless of the indexe(s) we apply.
We used double data type on the index type because of another posting, but we we get the same results regardless of the datatypes used in out index(s)
The @patient-ref and @id values are all positive integer values.
We've re-arranged the query, we've tried many different datatypes on the query.... Help!
The questions are:
a) are we on to the correct optimization strategy, and
b) please help us how to figure out how to get the right type of indexs applied.
Thanks...
dbxml> reindex system.dbxml n
dbxml> list
Default Index: node-attribute-equality-double
Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
2 indexes found.
dbxml> queryplan 'for $pid in collection()/reports-catalog/report/@patient-ref where $pid = collection()/patient-index/patient/@id return $pid'
<XQuery>
<FLWOR>
<ForBinding name="pid">
<Navigation>
<QueryPlanFunction result="collection" container="system.dbxml">
<OQPlan>P(node-attribute-equality-double,prefix,@patient-ref)</OQPlan>
</QueryPlanFunction>
<Step axis="child" name="reports-catalog" nodeType="element"/>
<Step axis="child" name="report" nodeType="element">
<OQPlan>P(node-attribute-equality-double,prefix,@patient-ref)</OQPlan>
</Step>
<Step axis="attribute" name="patient-ref" nodeType="attribute"/>
</Navigation>
<Where>
<Navigation>
<QueryPlanFunction result="collection" container="system.dbxml">
<RQPlan>V(@id,=,'[to be calculated]')</RQPlan>
</QueryPlanFunction>
<Step axis="child" name="patient-index" nodeType="element"/>
<Step axis="child" name="patient" nodeType="element">
<RQPlan>V(@id,=,'[to be calculated]')</RQPlan>
</Step>
<Step axis="attribute" name="id" nodeType="attribute"/>
<DbXmlCompare name="equal">
<Variable name="pid"/>
</DbXmlCompare>
</Navigation>
</Where>
</ForBinding>
<Variable name="pid"/>
</FLWOR>
</XQuery>

I did try the node-attribute-equality-string index before, but I must have left on my node-element-presence-none index, because now, I'm getting what looks like a much more improved query using the string index and NOT using the node-element-presence-none index.
dbxml> run test.xq
Default Index: node-attribute-equality-string
Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
002/dbxml}:name
2 indexes found.
Adding default index type: node-attribute-equality-string
Container reindexed: chb-system.dbxml
5000 objects returned for eager expression '
for $pid in collection()/reports-catalog/report/@patient-ref
where   $pid = collection()/patient-index/patient/@patient-ref
return
        $pid
Time in seconds for command 'query': 2.438
dbxml> run test.xq
Default Index: node-attribute-equality-string
Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
002/dbxml}:name
2 indexes found.
Adding default index type: node-attribute-equality-string
Container reindexed: chb-system.dbxml
<XQuery>
  <FLWOR>
    <ForBinding name="pid">
      <Navigation>
        <QueryPlanFunction result="collection" container="chb-system.dbxml">
          <OQPlan>P(node-attribute-equality-string,prefix,@patient-ref)</OQPlan>
        </QueryPlanFunction>
        <Step axis="child" name="reports-catalog" nodeType="element"/>
        <Step axis="child" name="report" nodeType="element">
          <OQPlan>P(node-attribute-equality-string,prefix,@patient-ref)</OQPlan>
        </Step>
        <Step axis="attribute" name="patient-ref" nodeType="attribute"/>
      </Navigation>
      <Where>
        <Navigation>
          <QueryPlanFunction result="collection" container="chb-system.dbxml">
            <RQPlan>V(@patient-ref,=,'[to be calculated]')</RQPlan>
          </QueryPlanFunction>
          <Step axis="child" name="patient-index" nodeType="element"/>
          <Step axis="child" name="patient" nodeType="element">
            <RQPlan>V(@patient-ref,=,'[to be calculated]')</RQPlan>
          </Step>
          <Step axis="attribute" name="patient-ref" nodeType="attribute"/>
          <DbXmlCompare name="equal">
            <Variable name="pid"/>
          </DbXmlCompare>
        </Navigation>
      </Where>
    </ForBinding>
    <Variable name="pid"/>
  </FLWOR>
</XQuery>
Time in seconds for command 'queryPlan': 0.188

Similar Messages

  • Help with context index with /, -, @

    Hi all!
    I have just start work with oracle. I have a problem with context index. Please help me. My problem is :
    I have two column 'name' and 'address'. I index two column with context index (for example : Two index have name is 'Index1' and 'Index 2' ). I set parameter ('STOPLIST ctxsys.empty_stoplist') and i insert four rows such as : ('A','80/3 cong hoa'), ('B','80-3 cong hoa'), ('C','80@3 cong hoa'), ('D','80 3 cong hoa'). But when i execute this select :
    select * from tablename where contains(address, '3 cong hoa') > 0
    Result will return to me 4 rows But i just want one rows is ('D', '80 3 cong hoa').
    I know oracle will convert character '/', '-', '@' to space so result will return 4 rows and i don't know how to oracle keep character '/', '-', '@' when oracle index. I just want to add with 'Index2' for column 'address' and i don't want to add with 'Index1' for column 'name'
    Please help me, and thanks for your attention

    So you want "/", "-" and "@" to link tokens, but you want "." to break numeric tokens?
    OK, we can do that - though it seems a slightly odd requirement.
    There are two special characters NUMJOIN and NUMGROUP which are used for purely numeric tokens. The default will vary by locale, but for English-speaking locales the defaults are "." and "," - so a number such as 1,234,567.89 will be treated as a single token. In French (and other) speaking locales, they are reversed since numbers are normally written as 1.234.567,89.
    If you want to disable these NUMJOIN and NUMGROUP characters, so that numbers are always split into component tokens, then you can set both of the to the space character (it won't allow NULL or '', which would be more logical in my opinion).
    drop table foo;
    create table foo (bar varchar2(200));
    insert into foo values ('80/3 cong hoa');
    insert into foo values ('80-3 cong hoa');
    insert into foo values ('80@3 cong hoa');
    insert into foo values ('80 3 cong hoa');
    insert into foo values ('80.3 cong hoa');
    exec ctx_ddl.drop_preference('foo_lexer')
    exec ctx_ddl.create_preference('foo_lexer', 'basic_lexer')
    exec ctx_ddl.set_attribute('foo_lexer', 'PRINTJOINS', '/-@')
    exec ctx_ddl.set_attribute('foo_lexer', 'PRINTJOINS', '/-@')
    exec ctx_ddl.set_attribute('foo_lexer', 'NUMJOIN', ' ')
    exec ctx_ddl.set_attribute('foo_lexer', 'NUMGROUP', ' ')
    create index foo_index on foo(bar) indextype is ctxsys.context
    parameters ('lexer foo_lexer');
    select * from foo where contains (bar, '3 cong hoa') > 0;Output is:
    BAR
    80 3 cong hoa
    80.3 cong hoa

  • Custom field F4 help - selected value/index

    Hi experts,
    We have an F4 help for a custom field in an assignment block and the values are populated using a standard structure currency field (CRMST_PRICINGSET_BTIL-CURRENCY)  in the GET_V method.
    We have also defined an event handler to capture the selection of the value from F4. But in this event handler, how can we get the value /index of the row selected in the F4 help?
    Since it is an F4 help and not a pop-up of type IF_BSP_WD_POPUP, we can't use the get_fired_outbound_plug( ) concept here.
    Regards,
    Nisha

    Hi NishaNC,
    If field is already in the structure, just use a check table like field CURRENCY in structure CRMST_PRICINGSET_BTIL.
    If not, please check component BT131QI_SLSQ, view Details, context node BTPRICINGSET, field NETPRICE_CURR.
    Create the methods and do the same way as methods for field NETPRICE_CURR.
    Of course, you need have a CURRENCY field in you structure first(same as structure CRMST_PRICINGSET_BTIL).
    For your issue, I think you already have a field in the structure, so just add a check table is OK.
    Regards,
    Meng
    Edited by: Lingxing Meng on Dec 2, 2010 3:27 PM

  • Help with array / indexed property

    Hi,
    I am trying to save the value of multiple dropdowns in the Session Bean. Therefore, I created an index property "rule" in the Bean.
    Each time the page is loadad, a different dropdown appears depending on the previous choices. If the ok button is clicked, the action is performed to save the current dropdown value in the index property:
    public String button1_action() {
    int cnt = 1;
    // if page was loaded before, replace count
    if (getAdminBean().getCount() > 0) {
    cnt = getAdminBean().getCount() +1;
    } else {
    // save current count in Session
    getAdminBean().setCount(cnt);
    setValue("#{AdminBean.rule[cnt-1]}", selectme.getValue());
    This is the error message:
    Exception Details: javax.faces.el.PropertyNotFoundException
    Error setting property '-1' in bean of type null
    Possible Source of Error:
    Class Name: com.sun.faces.el.PropertyResolverImpl
    File Name: PropertyResolverImpl.java
    Method Name: setValue
    Line Number: 153
    I have played around and even the following code would not work to save a value at the first position of the index property:
    setValue("#{AdminBean.rule[0]}", selectme.getValue());
    Can anyone help?
    Thanks,
    Nils

    You can not set the index as you use here i.e
    #{AdminBean.rule[cnt-1]}
    is not correct. Because in JSF the "[" is used for some other purpose.
    I would suggest you to use another property called "index"
    setValue("#{AdminBean.index", cnt-1);
    setValue("#{AdminBean.rule", selectme.getValue());
    Inside the session bean, in the method setRule get the index (already set) and place your value in the correct indexed array.
    Same logic you can use to get the value too
    setValue("#{AdminBean.index", cnt-1);
    getValue("#{AdminBean.rule");
    the method getRule() should get the value for the index and return it.
    - WInston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • Need some help with Adobe Indexes

    Hello Reader forum! I'm looking for help to make our lives in IT easier.
    We have about 15 pdf files with pdx or index files setup for quick searching. They reside in seperate folders off of a network share.
    Problem is we are about to migrate the share to a new server and about 50 to 60 users have there local installation setup pointing to those shares via \\UNCname. So once we move the share we will have problems, being that we would have to walk to each PC and manually update the index file locations for each user.
    So my question/desire is to either copy the specific file that houses the index paths to all of the PC's or perhaps use VB Script to change all of the references automatically.
    They should all be on 9.0 reader at least.
    Any ideas, suggestions, point me in the right direction would be appreciated.

    Ping this up to the top and looking for any help!

  • Help with value change events

    I need to be able to use the value change event to handle sorting and control the properties of a multicolumn listbox. I have a slow loop that runs every 10 seconds and acquires new data if it's available. New data is appended directly to the list box. The event structure handles two events. One to change colors of the text when new data is added and another to sort the contents when a user clicks on the column header. The first event seems to work just fine. It only runs when new data is added. The second event is the problem. It runs every time the loop runs and ties up the user interface so that it does not respond.
    What am I doing wrong??
    By the way, it seems that whatever I am doing wrong crashes LabVIEW while I am
    editing the vi. Probably during a partial compile. LabVIEW crashed twice while I was creating this test vi and I don't normally have trouble with LabVIEW crashing. It has crashed in both the transact.cpp and panel.cpp.
    Thanks for any help or guidance you can offer.
    Attachments:
    Event_Handling_Test.vi ‏242 KB

    I have made a few quick modifications, see attached.
    -- The lower loop should probably be a plain loop, since the timing is done by the event structure.
    -- You cannot use a shift register in the upper loop if you want the acquired list to remain sorted.
    Sorry, I am on vacation in the middle of nowhere and only spend a few minutes on this. There are many improvements possible.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Event_Handling_TestMOD.vi ‏200 KB

  • Help with set(index, object) please / new to java

    private static void setDobject(Rectangle [] setrect)
              LinkedList<Rectangle> rects = new LinkedList<Rectangle>();
              Rectangle myrectangle = new Rectangle(9.0,9.0);                                                                  
                 rects.set(1,myrectangle);
              for(Rectangle x : setrect)
                   System.out.print("Rectangle: ");
                   System.out.println(x.getLength() + " by " + x.getWidth());
              }  //End of for loop
         }  //End of unsorted
         }  the other previous code works, i have used the add(object) and it works here is the code for that:
    private static void addDobject(Rectangle [] addrect)
              LinkedList<Rectangle> rects = new LinkedList<Rectangle>();
              Rectangle myrectangle = new Rectangle(9.0,9.0);                                                                  
                 rects.add(myrectangle);
                 for(Rectangle x : rects)
                   System.out.print("Rectangle: ");
                   System.out.println(x.getLength() + " by " + x.getWidth());
              }  //End of for loop
              System.out.println();
         }  //End of unsorted
    this is the output error it is giving me :
    Part 1 : An Array List of Rectangles
    Enter length or 999 to exit: 3
    Enter width: 2
    Enter length or 999 to exit: 1
    Enter width: 2
    Enter length or 999 to exit: 10
    Enter width: 20
    Enter length or 999 to exit: 999
    Rectangle: 3.0 by 2.0
    Rectangle: 1.0 by 2.0
    Rectangle: 10.0 by 20.0
    Display Object with added item
    Rectangle: 3.0 by 2.0
    Rectangle: 1.0 by 2.0
    Rectangle: 10.0 by 20.0
    Rectangle: 9.0 by 9.0
    Displaying Objects with SET item
    Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size:
    0
    at java.util.LinkedList.entry(LinkedList.java:365)
    at java.util.LinkedList.set(LinkedList.java:328)
    at Lab11.setDobject(Lab11.java:129)
    at Lab11.main(Lab11.java:78)
    Press any key to continue...
    finally here is the Rectangle class i'm using:
    public class Rectangle
        private double length;     // Instance variables
        private double width;
        public Rectangle(double l, double w)  // Constructor method
            length = l;
            width = w;
        } // end Rectangle constructor
        public double getLength()             // getter 
             return length;
        } // end getLength
         public double getWidth()             // getter 
             return width;
        } // end getWidth
        public void setLength(double l)      // setter 
             length = l;
        } // end setLength
         public void setWidth(double w)     // setter 
             width = w;
        } // end setWidth
         public double calculateArea()         // calculation method
            return length * width;
        } // end calculateArea
        public void displayRectangle()         // display method
            System.out.println("Rectangle Length = " + length);
            System.out.println("Rectangle Width = " + width);               
        } // end displayRectangle
    } // Rectangle ClassHope you can help guys! thanks!

    LinkedList<Rectangle> rects = new LinkedList<Rectangle>();rects is an empty LinkedList at this point. It has no elements added to it.
    rects.set(1,myrectangle);So you can't set the item at index 1 (the 2nd element in the list) because it doesn't even exist. You need to add items to it.

  • Search Help with value on SE11

    Hi Gurus,
    I have two parameters on my screen, PARTNER and PSOBKEY. I have created a Search Help on SE11 for the second parameter, and this search help has that 2 parameters too.
    First I enter PARTNER, then I open the search help for PSOBKEY, and I want the value on PARTNER to be on the search help.
    How I can do this from the SE11?
    Thanks for your help.
    J. Garibaldi

    Hi Garibaldi,
    In your search help the PARTNER should be one of the search help parameters. It should be marked as IMP (Import) parameter. The name of this parameter in the search help should be same as that on your screen. The parameter PSOBKEY would be the EXP (Export) parameter of your search help.
    If you maintain above things, when you enter the PARTNER field on the screen and open the search help of PSOBKEY, the value of the PARTNER screen field would be automatically copied and imported into your search help.
    Please refer to the SAP help http://help.sap.com/saphelp_47x200/helpdata/EN/4f/991f82446d11d189700000e8322d00/frameset.htm for more detailed understanding.
    Regards,
    Suresh

  • Help with a Index on sql server

    I have a table named AVAILABILITY
    ID - IDHOTEL - IDROOM - DATE_FROM - DATE_TO
    for each room a hotel insert a period (from - to) when the room in booked
    Considering this query
    select id, date_from, date_to from AVAILABILITY
    where IDHOTEL = #idhotel#
       and IDROOM = #idroom#
       and DATE_TO >= #dateadd("d",-1,now())#
    order by DATE_FROM
    Could you suggest me a index to create on the table ?

    Depending on how many rows are in there, you may find the database engine doesn't actually bother using the index at all, it's not until you have thousands of rows it really starts to make a difference.
    Weigh that up with the amount it'll slow down inserts, and you might find it detrimental to create an index. Definitely put in queryparams though, there's never an excuse for not doing that and as Dan says that'll speed things up a bit.

  • Need Help with INSERTS & INDEXES

    Let me try explaining my scenario and then my confusion:
    Scenario:
    Parent_table
    Child_table
    Both Parent_table & Child_table have Indexes and Constraints.
    Confusion:
    If I remove all Indexes and Constraints, my INSERTS are 10 times faster. Howevere I am taking a chance of:
    1. Loosing Referential Integrity (No Parent row for a Child Row).
    2. Storing Duplicate data.
    The chnaces of either one of this happening is rare, but it is a definite possiblility.
    I am trying to find some articles that will give me some guidance on how this should be done right. Such that I can disable certain Indexes, so that the existing data can be queried without any problems and the new data is Indexed after the load.
    Any help will be appreciated.
    -- Thanks

    Maintaining indexes certainly requires some additional overhead during inserts. Generally, though, you've got indexes in place to allow you to query data at an acceptable speed. Presumably, when you remove all your indexes, all your reporting/ OLTP applications will crawl to a halt.
    What are the indexes you have on these tables and why do those indexes exist? Frequently, you'll find that you may have indexes that are useless either because they are essentially duplicated by other indexes or because they are indexing attributes that don't benefit from having indexes. If 90% of your insert time is being spent updating indexes, that certainly seems like a possibility here...
    Justin

  • Need help with Value '# ' of 0REF_DOC_NO contains invalid characters

    Hi Experts
    We are having load failure due to this Value '# ' of characteristic 0REF_DOC_NO contains invalid characters error. I have managed to find out at PSA level there are few records with contains # value. I have also informed the user about it and user had rectified the record from ECC level.
    Our load goes evey night through process chains from PSA to DSO and then to Cube.
    We have requests in DSO till today and the problem happened two weeks ago e.g. 7 DEC. In cube the last record came on 6 DEC as after that it was failing everyday.
    Now I am just wondering with few questions :-
    Should I wait for next delta load to happen so that it can bring all the records from DSO to Cube or Do i need to change the record of that certain date in DSO too.
    Please give me your valuable suggestion and steps.
    Regards
    Sunny

    Sorry for posting it in wrong section, i have moved it to right thread now.
    Cube is failing with invalid characters error Value #  of 0REF_DOC_NO

  • New and need help with $ value in a sell

    I just bump into this product and h
    ave fall in love with. how do I format
    starting pay field to $0.00 in
    the numeric field instead of just 18
    any free tutuorial is appreciated

    Set the display pattern for the Date/ Time Field to "date{MM/YY}" to display like 08/10..
    Thanks
    Srini

  • Need help with an index creation

    Hi,
    Oracle 8.0.6,
    Win 2000 server
    SELECT PT_CODE,BUS_UNIT,TOP_BRASS_YN,ROOM_CLASS_CODE,WARD_CODE,
    ADMIT_STATUS_FLAG,PT_ADMIT_DATE,PT_ADMIT_TIME,MD_CODE,REQUEST_NO,REG_NO,
    INP_REG_NO,MOTHER_PT_CODE,CRE_NOTES,PT_DIAGNOSIS_NOTE,
    TMP_CLINIC_DISCHARGE_DATE,ROOM_CODE,BED_CODE,ROWID
    FROM
    A_INP_PATIENTS_ADMT WHERE bus_unit = :1 and admit_status_flag = 'C' and
    nvl(clinical_discharge_yn,'N') not in ('Y','C') and (ward_code = :2 or :3 =
    '007') order by room_code
    call         count       cpu    elapsed       disk      query    current        rows
    Parse 1 0.00 0.03 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 4 0.14 26.61 2306 47604 0 33
    total 6 0.14 26.64 2306 47604 0 33
    I want to create a function based index on column nvl(clinical_discharge_yn,'N').
    I issued the following command,
    create index new_index on A_INP_PATIENTS_ADMT (bus_unit, admit_status_flag, nvl(clinical_discharge_yn,'N'), ward_code)
    But i am getting the error ORA-00907:missing right parenthesis.
    Could you plss tell me where am i missing the parenthesis
    Best Regards,

    If I remember correctly function-based indexes weren't introduced until the 8.1.x versions of Oracle.

  • Help with z-index

    I'm trying to design an online sticky note. It's working fine
    in Safari, Firefox (Mac and PC) and IE Mac, but it's not working at
    all in IE Win.
    It's supposed to display the entire sticky note over the rest
    of the content on page load, then the sticky turns into a bar and
    you have to click the bar to get the sticky back.
    All its doing on IE WIn is make an outline. Any suggestions?
    Here's the page:
    http://milehighnews.com/114260.112112body.lasso
    Here's the code:

    Nevermind, It's the active content block problem

  • Help with a PowerPivot query

    Hi,
    I've got a server audit log in PowerPivot (114,000 rows) which I provide some basic reporting from (PowerPivot is not my specialist subject so go easy).  What I now need to perform a Distinct filter, but can't get the logic right. Basically the log
    as two bits of information, 1) is the source of the job and 2) if it was a success or failure.    What I need to do is to find all of the Source items that have never completed sucessfully.  Any ideas on what formula is best to use, or
    do I need to split in to multiple sheets and create a table relationship?
    Source,Status
    ======,======
    Source1,Fail
    Source1,Fail
    Source1,Success
    Source2,Fail
    Source3,Fail
    Source3,Success
    So in the above example, I would only expect the filter to show me Source2
    Thanks
    Alex

    Hi Alex,
    using Power Query instead, it would work like this:
    Once you've pushed your table to PQ, add a column "helper" with value=1.
    Then pivot on "Status", taking "helper"-column into "values column"
    (hope translation is understandable, as I'm using localized Version & translation via "Quick info" isn't working in the PQ menu)
    Then filter on column "Success" = blank.
    Imke

Maybe you are looking for

  • Registering ABAP system with SLD Web AS JAVA

    Hello, I'm trying to register an ABAP only system with an SLD that resides on a JAVA-only system. When registering the ABAP system in RZ70, I enter the gateway host of the JAVA-only system and the gateway service as "sapgw<instance>". However, when l

  • No Surround bounce: "Filesize exceeds 2 GB" - WHAT ???

    Hi 2 all, I will repeat a post that I found closed in the discussions because I just came across this problem and looking for help. The original post (wonder why it was closed down) : Lukrex Posts: 1 From: Italy Registered: Dec 5, 2005 Logic Surround

  • Proc*C/C++ support for header files without .h extension.

    Does Pro*C/C++ compiler suppport include files without .h extensions.?? The following code written in a .pc file, which is compilant to Standard C++ 5.0 standards when compiled with Pro*C/C++ compiler to generate a .cpp gives errors #include<isotream

  • Update to 2014 / old cc-versions?

    After an update to cc2014 can / or should I deinstall the old cc-versions of the applications?

  • I updated my 3GS iphone to 5.0.1 cannot receive calls or messages.

    I updated my 3GS iphone to 5.0.1 yesterday.  I can make calls and send messages, but cannot recieve calls or messages. I called telstra as I instantly thought network problems.  My friends and family who are also on telstra have not had network issue