Index not used for order by/subsequence

Hello,
I can't seem to get DBXML to efficiently return an ordered subsequence (so that a web page can do pagination in order). I have 100,000 entries in my test container and the following indexes:
Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
Index: edge-element-equality-dateTime for node {}:when
Index: edge-element-equality-double for node {}:whenNumber
queryPlan "
for $x in (collection('test.dbxml')/root)
    order by $x/whenNumber
    return subsequence($x, 1, 10)
"Gives me a plan with a sequential scan in it:
<XQuery>
  <Return>
    <OrderByTuple direction="ascending" empty="least" stable="false" collation="http://www.w3.org/2005/xpath-functions/collation/codepoint">
      <ForTuple uri="" name="x">
        <ContextTuple/>
        <QueryPlanToAST>
          <StepQP axis="child" name="root" nodeType="element">
            <SequentialScanQP container="test.dbxml" nodeType="document"/>
          </StepQP>
        </QueryPlanToAST>
      </ForTuple>
      <TreatAs>
        <PromoteUntyped uri="http://www.w3.org/2001/XMLSchema" name="string">
          <Atomize>
            <QueryPlanToAST>
              <StepQP axis="child" name="whenNumber" nodeType="element">
                <VariableQP name="x"/>
              </StepQP>
            </QueryPlanToAST>
          </Atomize>
        </PromoteUntyped>
        <SequenceType type="item()?"/>
      </TreatAs>
    </OrderByTuple>
    <Function name="{http://www.w3.org/2005/xpath-functions}:subsequence">
      <QueryPlanToAST>
        <VariableQP name="x"/>
      </QueryPlanToAST>
      <NumericLiteral value="1.0E0" typeuri="http://www.w3.org/2001/XMLSchema" typename="double"/>
      <NumericLiteral value="1.0E1" typeuri="http://www.w3.org/2001/XMLSchema" typename="double"/>
    </Function>
  </Return>
</XQuery>The index is used correctly if I do a conditional query as I woudl expect

Hi,
These look like queryplan generator issues. I'm looking into it. Thanks.
Best regards,
Rucong Zhao
Oracle Berkeley DB XML

Similar Messages

  • Index not used for search

    Hallo all,
    I created some Indexes that I select in the advanced search options. I even reindexed them for being sure that the documents are listed in there.
    Now if I'm searching for properties, title, text, or something else no one of the documents get found.
    An other index that was function before, don't find the documents after reindexing.
    Could anybody help me?
    Thank you.
    By Johannes Reinhardt

    Hi Johannes,
    please state the exact releases and patch levels of your EP-KM and TREX. Either here or directly in a support message to SAP.
    Thanks, Karsten

  • Why Inner join or Outer join is not used for Pool or Cluster tables  ?

    Hi SAP-ABAP Experts .
    With Due Regards .
    May u explain me why Inner join or Outer join is not useful for Pool or Cluster tables  ?
    because peoples advised not use Joins for Pool and Cluster tables , What harm will take place , If we do this ?
    Best Regards to all : Rajneesh

    Both Pooled and Cluster Tables are stored as tables within the database. Only the structures of the two table types which represent a single logical view of the data are defined within the ABAP/4 Data Dictionary. The data is actually stored in bulk storage in a different structure. These tables are commonly loaded into memory (i.e., 'buffered') due to the fact they are typically used for storing internal control information and other types of data with little or no external (business) relevance.
    Pooled and cluster tables are usually used only by SAP and not used by customers, probably because of the proprietary format of these tables within the database and because of technical restrictions placed upon their use within ABAP/4 programs. On a pooled or cluster table:
    Secondary indexes cannot be created.
    You cannot use the ABAP/4 constructs select distinct or group by.
    You cannot use native SQL.
    You cannot specify field names after the order by clause. order by primary key is the only permitted variation.
    I hope it helps.
    Best Regards,
    Vibha
    Please mark all the helpful answers

  • Indexes not used in Oracle 8i

    Hi Everybody,
    Does anybody know how can i know which indexes are not used in our Oracle 8iR3 Database.
    We need to purge as soon as possible all indexes not used
    in our Datawarehousing system because they're growing and growing.
    I know there's some mechanism in Oracle 9i to query which are unused is it possible to simulate something similar?
    Kind regards and thank you in advance.
    José Luis Pérez
    [email protected]

    Are you asking about index monitoring in 8i? One way (and there aren't very many at all) of doing this is to collect (query them out of the DD) execution plans and scan those for index usage.

  • The sort field is not used when ordering multiple cds in one alumn folder, how do I correct this?

    It is using the track number and not the sort order field.  The reason I have multiple cds in one alumn is because they are books on cd.

    Sorry for the typo my "b" key was not working correctly.
    The sort field is not used when ordering multiple cds in one albumn folder, how do I correct this?  It is using the track number and not the sort order field.  The reason I have multiple cds in one albumn is because they are books on cd.

  • Why when I try to update certain app it require an old email address and password I have not used for years and I do I get to update them on my new details

    Why when I try to update certain app it require an old email address and password I have not used for years and I do I get to update them on my new details

    Apps are tied to the Apple ID that was used to purchase them and you will always need to use that ID and password in order to update them.
    Saying that you do get to update them on your new details makes no sense at all.

  • With out goods issue for order system should not allow for order confirmati

    Dear all
    with out goods issue system should not allow for order/operation confirmation.
    how it is possible.
    Regrads
    Srinivas

    Dear ,
    In some cases we required to do confirmation or TECO without GI .
    We can change it as per req using user exit
    Regards,
    Ishwar

  • Following a software update, I can no longer access/authorise music purchased via iTunes from my old Apple ID, which I have not used for 8  years, and no longer have password.  Any ideas how I can re-access/recover that music?

    Following a software update, I can no longer access/authorise music purchased via iTunes from my old Apple ID, which I have not used for 8  years, and no longer have password.  Any ideas how I can re-access/recover that music?

    Apple ID FAQs  >  http://support.apple.com/kb/HT5622

  • Order Reason ABC not defined for Order Type Retrun order

    Hi
    I am getting following " Message no. V1 899 " when i am  doing return order without refernce .
    Order reason is defined in customization but still we are getting the following message " Message no. V1 899 " /Order Reason E18 not defined for Order Type ZEF9.
    Can any one help me
    regards,
    kiran

    Hi Kiran
    As you have created sales order with document type ZEF9 but you have not taken any reference document then go to VOV8 and select ZEF9 and maintain  the order reason feild and then do the process
    Regards
    Srinath

  • Que-''actual activity allocation is not allowed for order .''

    hi ,
    During confirmation of operation at co11n (also at co11), got one error massage i.e  "actual activity allocation is not allowed for order "
    Due to this error confirmation is not possible .
    pls help me to solve this problem.
    AMOL WAGH
    Edited by: amol  wagh on Dec 6, 2008 8:09 PM
    Edited by: amol  wagh on Dec 6, 2008 8:10 PM

    Dear,
    For allocation activity costs, we need to define activity type in KL01 by specifying the unit of measurement of the particular activity type (like machine - Hours etc.). While creating activity type, we will assign a secondary cost element (with category 43) in the activity type through which the activity cost will flow.
    After that we will plan for cost center in KP06 (cost elementwise). Then we will plan machine hours in KP26 where we will link the activity type to a particular cost center.
    Please give the feed back.
    Regards,
    R.Brahmankar

  • Actual activity allocation is not allowed for order .

    hi ,
    During confirmation of operation at co11n (also at co11), got one error massage i.e "actual activity allocation is not allowed for order "
    Due to this error confirmation is not possible .
    pls help me to solve this problem.
    AMOL WAGH

    Dear,
    What is message number? Did you assign the usersttus in BS02?
    For allocation activity costs, we need to define activity type in KL01 by specifying the unit of measurement of the particular activity type (like  machine - Hours etc.). While creating activity type, we will assign a secondary cost element (with category 43) in the activity type through which the activity cost will flow.
    After that we will plan for cost center in KP06 (cost elementwise). Then we will plan machine hours in KP26 where we will link the activity type to a particular cost center.
    When we do price calculation in KSPI, system checks the planned costs for cost center (in KP06) and also checks the machine hours planned (in KP26) and gives the cost for the particular activity type.
    Please check the above in the system
    Regards,
    R.Brahmankar

  • My Macbook Pro purchased Dec 2011 has suddenly become very slow after not using for 2 weeks (close to frozen). What is the problem and how to solve it?

    My Macbook Pro purchased Dec 2011 has suddenly become very slow after not using for 2 weeks (close to frozen). What is the problem and how to solve it?

    Need Help Ye,
    boot your MacBook Pro into Recovery mode by holding down a Command key and the R key as it starts up. Once the Mac OS X Utilities menu appears, select Disk Utility. On the left-hand side of the Disk Utility window, select your internal disk’s boot partition (typically called “Macintosh HD”). On the right-hand side, press the Verify Disk button if it’s not greyed out; if it is greyed out, or if it reports that errors were found, press the Repair Disk button. Once the verification/repair is completed, exit Disk Utility and select Restart from the Apple menu to restart in normal mode. Is it still very slow?

  • I have a version of photoshop 7.0 which I have not used for some years. I would like to install it o

    I have a version of Photoshop 7.0 that I have not used for some years. I want to now install it on my computer which uses Windows XP. How do I go about it?
    Thanks

    You simply run the install program and hack in your serial number.
    Mylenium

  • I have an iPod mini that I have not used for mover 3 years.  I am trying to download music and it  is giving me a warning sign.  How can I fix this issue.

    I have an iPod mini that I have not used for more than 3 years.  I am trying to download music and it is giving me a warning sign.  How can I fix this issue?
    patrishafrombrooklyn

    Try:
    http://snapguide.com/guides/calibrate-your-home-button/?utm_expid=69945963-15
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • I have an old AOL account not used for years. No I have realized some years ago I have signed in into the apple storewith this email. Now I am not able to change this apple ID. Has s.o. an idea how to work this out?

    I have an old AOL account not used for years. No I have realized some years ago I have signed in into the apple storewith this email. Now I am not able to change this apple ID. Has s.o. an idea how to work this out?

    See this -> http://support.apple.com/kb/TS1299

Maybe you are looking for

  • Cancelling Credit memo not reverse the accounting document

    Hello, Hello, We are facing pecular problem in production system when we Cancel the sales credit memo system is not genarating the reversal accounting document and it's genarating the entry same way credit memo. When we do the credit memo it's passin

  • Connect Apple TV to PC ad hoc network

    my PC wifi ad hoc is not listing up in Apple TV (3rd Gen) wifi networks, but it's working on my iPhone. i have searched in google and apple portal, they says it won't work with adhoc networks, if it's true will return back the Apple TV

  • Payment Reference

    Hi All, While Posting an invoice, I am entering some value in the PAYMENT REFERENCE field (BSEG-KIDNO).  And when I am paying this invoice through Payment run (F110), i expect the value in the Payment reference of the paid invoice to be copied to the

  • Updating Apps in iTunes from my Phone

    The Apps on my iPhone are updated. I sync the phone with a MacBook Air. I also want to sync the phone with my iMac.  on the iMac iTunes is showing apps that are available for update and wants to re-download these.  Why can I not sync the apps from my

  • I've reloaded my OS so many times & it still randomly shuts down?!

    My Blackberry Curve 9300 shuts down around 40% without any notification. I've replaced the battery and that didn't solve the issue, I've wiped & did a restore & that still didn't resolve the issue. So I replaced the phone and that didn't even resolve