Can I union several cursors for the same secondary db?

I want to search several keys in one secondary database.
select * from adb where a=6 or a=9 or ....
certainly, this can be done by running several queries, but it is definitely slow.
wondered if it is possible to union these several cursors together, then fetch the data from the primary database at once? seems this is not supported in current BDB implementation.
trying to modify the bdb code to support the cursor union operation. but get lost in the code. (seems java version is simpler than the c version. )
can some friend from Oracle, Ron, Bogdan, Andrei,Alexander
shed me some light on how a cursor in bdb is implemented. did not find too much detail in the document.
and hope this is in the to-do list of next version.
thanks

Hi,
The idea of joining cursors on the same secondary db presents no logic since you don't want to identify common keys within the records corresponding to each cursor.
A join cursor works the following way: the first cursor on a secondary db within the cursor array is analyzed and each primary key that the cursor refers to is searched within the next primary keys refered to by the next joined cursor in the array, and so on, leading to identifying the primary keys that each of cursors within the array refer to (the common keys).
What you want to achieve on a secondary db can be accomplished by positioning several cursors on the records that you want, begin reading sequentially with each of them, go to the other when you have finished reading with one cursor. A faster approach, which shouldn't involve any locking issues since the acquired locks are shared/read locks and you'll not perform any writes at that moment, may be that of spawning several threads and open a cursor within each thread, thus performing multithreading cursor read operations. You'll have to analyze each approach with regard to how many duplicates the cursors will refer, time consumed to spawn the threads etc.
Let us know if you need further information, regards,
Andrei

Similar Messages

  • HT4098 my credit card has been charged several times for the same purchase

    Hello,
    Do you know how I can connect with I Tunes support, my credit card has been charged several times for the same purchase.

    You can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Can we create two POs for the same 3rd party Sales Order?

    Hi MM experts,
    Issue: Can we create two POs for the same 3rd party Sales Order
    In Third party purchase process, first sales order created with a spl. item category  and it creates the PR automatically with the Sales order material and Qty and this PR converted PO.
    They got a pur.req. for sale order on same item for same delevery date. They did not get any warning msg. saying that a PO was prviously placed against this sale order.
    How it is possible that we were able to place another PO? concern is that second PO was palced against SO which was already used & completed. they were able to place 2 POs for the same customer same delevery date. How it is possible?
    If anyone face the same issue, please let me know if you have any answer to this questions.
    Thanks in advance.
    Suresh.

    Suresh,
    It is hard for me to give you a definitive answer since you have created a customized solution.
    How it is possible that we were able to place another PO? concern is that second PO was palced against SO which was already used & completed. they were able to place 2 POs for the same customer same delevery date. How it is possible?
    Normally, the system will not do this.  A third party PR or PO will be 'account assigned' to the Sales order.  SAP standard 3rd party will not create additional purchase reqs unless there has been manual intervention.  Try searching for changes in the Sales order and changes in the original purchase order.  They may give you a clue.
    I believe the normal Item category for third party SO is TAS (I am working from memory here, I am not in front of a system).  I don't know what ZTAG does.  I confess I am not an SD expert.  You might also want to post your question in an SD forum.
    You mention two custom applications, ZMMPLAN and ZSTPMP.  These somehow have functionality that is used to help you convert your PRs to POs.  If I were in your position, I believe I would also look at these applications for clues to how they might be contributing to your problem.  And please don't send me details about these apps.  I will not comment on custom code in this forum.
    Sorry I can't be of more help.
    Rgds,
    DB49

  • Can I backup several machines to the same TC?

    Can I backup several machines to the same TC?

    Can I backup several machines to the same TC?
    Yes. No special configuration is required, and there are no extra issues other than the additional space requirement.
    (49833)

  • I am new to pages and want to know how to link elements together to create one unified element that I can then duplicate several times on the same page?

    I am new to pages and want to know how to link elements together to create one unified element that I can then duplicate several times on the same page?

    I think you are talking about grouping objects.
    1. They must all be floating objects
    2. Command click on each in turn
    Menu > Arrange > Group
    Peter

  • TS1424 i am being charged several times for the same app

    I am being several times for the same app

    Welcome to the Apple Community.
    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.

  • ITune has created several folders for the same album title.  How do I consolidate those folders into 1?

    iTune has created several folders for the same album title.  How do I consolidate those folders into 1 without consolidating all albums?

    I don't think you want to combine all of the HTML into one file. That doesn't make too much senese. If you wanted to, then just copy everything from all 3 files between <body></body> and paste into one html file between <body></body>. I think what you're trying to do is create seperate static pages. I would read/youtube how to setup a blogger website. This website also might help you out - http://www.wikihow.com/Add-a-Page-to-Blogger. This video will show to how to create a navigation - http://www.youtube.com/watch?v=8KD3vF8ofgw

  • How can I export several versions at the same time?

    Greetings -
    I'm looking for something that I may just be missing, and hoping someone here can point me in the right direction.
    Basically, I'd like to be able to select an image in my library and export several versions at the same time. For example, I select a photo and export JPG, TIFF and PSD versions in one shot without having to run three separate export requests - essentially a batch action. I can't imagine that this isn't built in already - I'm just assuming that I'm missing something obvious.
    Thanks in advance for any advice anyone might have.
    John.

    Fwiw, I've not seen this requested before.
    This kind of Export option is very typical, Kirby, when the rendering of the exported version will take a long time, for example for video or audio. Then you can share several formats at once, to render a version suitable for the web, for viewing on the computer, or the iPhone at the same time. That is really useful, if you render a movie at a full HD resolution and don't have to do it again for an iPhone/iPod version.
    QuickTime 7 does this for the "File > Export for Web" option, for example. You can get three versions of your final movie at the same time.
    And I just checked, the new iMovie Theater does this as well, when sharing a movie to the Theater:
    When you add a movie, trailer, or clip to the Theater, iMovie creates versions of your movie tailored for local playback, playback on an iOS device, and streaming.
    Come to think about it - exporting a webpage from Aperture will also export thumbnail sized images plus a larger version for downloading.

  • Can we have multiple transports for the same object.

    Hi guys,
    Can we have multiple transports for same object in dev system. Can anyone tell me how can this be done.
    Thanks

    Its not possible for the same development object. Only 1 person can access an object at a time and if mutiple users modify an object new TASKs are created under the same TRANSPORT.
    Only after releasing the tr you can create a new tr on the same object.
    Message was edited by:
            Abhishek Jolly

  • Can we have multiple policies for the same gateway?

    Hi all,
    Is there a way in which we can have multiple policies for the default gateway?
    When I try adding a new gateway (which is not mentioned in the installer.properties file) and have policies, there is a 404 error.
    When I add another service to the same gateway, I get an error - that the service could not be added to default policy.
    Help me please...
    My need is as follows
    Want to have multiple policies, so that each of the web-service can be attached to same. The relation needs to be one-to-many. One policy can have multiple web-services.
    Thanks in advance...

    Its not possible for the same development object. Only 1 person can access an object at a time and if mutiple users modify an object new TASKs are created under the same TRANSPORT.
    Only after releasing the tr you can create a new tr on the same object.
    Message was edited by:
            Abhishek Jolly

  • Insert several dates for the same event

    Hey guys,
    I have two tables joined. 1 with dates and venue, the other
    with speakers.
    How can I add more dates to the same speaker during his
    programme of appearance. i.e. Speaker A will be appearing for the
    following dates: 20/02/2007 - 27/02/2007 & 5/03/2007.....
    I was thinking of a Date fiels and a dropdown dynamic field.
    But I'm having problems figuring it out...
    Any help would be very much appreciated..
    Thanks

    Thanks Sabaidee,
    Please find below the whole code:
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND
    FORM.MM_InsertRecord EQ
    "insert">
    <cfquery datasource="utcg302">
    INSERT INTO speaker (speakerName, venue, eventDate)
    VALUES (
    <cfif IsDefined("FORM.speaker") AND #FORM.speaker# NEQ
    "">
    <cfqueryparam value="#FORM.speaker#"
    cfsqltype="cf_sql_clob"
    maxlength="150">
    <cfelse>
    </cfif>
    <cfif IsDefined("FORM.Venue") AND #FORM.Venue# NEQ "">
    <cfqueryparam value="#FORM.Venue#"
    cfsqltype="cf_sql_clob"
    maxlength="50">
    <cfelse>
    </cfif>
    <cfif IsDefined("FORM.date") AND #FORM.date# NEQ "">
    <cfqueryparam value="#FORM.date#"
    cfsqltype="cf_sql_timestamp">
    <cfelse>
    NULL
    </cfif>
    </cfquery>
    </cfif>
    <cfquery name="rsInsert" datasource="utcg300">
    SELECT speaker.speakerID, speaker.speakerName, speaker.venue,
    speaker.eventDate, review.reviewID, review.review
    FROM speaker INNER JOIN review ON speaker.actID =
    review.actID
    ORDER BY speaker.eventDate
    </cfquery>
    <form
    action="<cfoutput>#CurrentPage#</cfoutput>" id="insert"
    name="insert"
    method="POST">
    <label for="textfield">Date</label>
    <p>
    <input name="date" type="text" id="date" />
    </p>
    <table width="200">
    <tr>
    <td><label>
    <input type="radio" name="Venue" value="Stoney" />
    Stoney</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="Venue" value="William Edwards"
    />
    William Edwards</label></td>
    </tr>
    </table>
    <p> </p>
    <p>
    <label for="select">speaker</label>
    <select name="speaker" id="Speaker">
    <option value="">Choose One</option>
    <option value=""></option><cfoutput
    query="rsInsert">
    <option
    value="#rsInsert.speakerID#">#rsInsert.speakerName#</option>
    </cfoutput>
    </select>
    <p>
    <label for="Submit"></label>
    <input type="submit" name="Submit" value="Submit"
    id="Submit" />
    </p>
    <input type="hidden" name="MM_InsertRecord"
    value="insert">
    </form>

  • Can create twice billing document for the same delivery in STO

    Hi experts,
    I donot have problems in Standard Sales order when I create billing doc via VF01. When I try to create another billing doc in VF01 for the same delivery it says error, as the item is already invoiced.
    This is correct. 
    But while creating invoice for STO order, system allows me to create more than 1 billing document for the same delivery. If we accidentally or purposefully create it allows to create many.
    Could you let me know where in SPRO (IMG) I can control this?
    Thanks,
    Pri

    Hi
    STO billing if it is intercompany STO followed by IV billing type you can create only once
    No special settings reqd to achieve this as you bill  (IV billing type) the delivery the first time, the delivery status gets completed
    If Intracompany, the billing type is proforma invoice F8  and this can be created as many times as you wish as proforma doesnot update accounting
    if your issue is this
    Even this also if you want to restrict only once then try with copying requirenments 311 at item level (i hope standard item category NLN is used) in VTFL between header NL to F8
    Regards
    Raja

  • Can we have two textures for the same project ?

    Hello all
    I use Captivate4. In my project, the background transparency for Playbar controls is 100%. So the texture would be seen as the background for the PlayBar. I have a requirement of hiding PlayBack Controls in few slides. Then I would like to change my texture to some other image. in brief, I would like to show one texture when the PlayBar is visible & another texture when the PlayBar is invisible.
    Is that possible?
    Thanks & regards,
    Kartik.

    OK.  This would be a little easier to do in Captivate 5 which has Master Slides and Playbar Overlay. But since you have Captivate 4 you will need to make do with adding graphics to the background of the actual slide, and just turning off the Playbar.
    From the graphics you added to your last post, it looks like you already know what you want the background to look like. You want a different background for Slide A and Slide B.  One way to do this is to add the graphic to each slide, then right-click and select Merge with Background.  But you can also just put the image on the lowest layer on the timeline of each slide and the effect would be similar.
    Regarding the Playbar...Since you are on Captivate 4, you do not have the option to set Playbar to Overlay.  I've just looked in Captivate 4 but the option is missing.  Here is what the Skin Editor looks like in Captivate 4 and 5.  Notice the Playbar Overlay setting is missing in Cp4.  There may be another way to do this but I don't know.
    This playbar overlay option would have allowed you to set the position of the playbar as sitting over the bottom 30 pixels or so of the stage area.  Since you can't do this, you may need to be satisfied with seeing the area occupied by the playbar go blank when it is hidden.
    To hide your playbar on Slide B, you will need to add an Advanced Action on Slide Enter that turns off the playbar by assigning the variable cpCmndShowPlaybar to 0.  Here is what that looks like in the Slide Properties dialog for your Slide B.

  • Can I have two apps for the same ipad with different configurations.

    I have an app that I need to use for StarRez.  But the settings for the app only allow one user, one password.  We will have two users to share the ipad.  Can I create another app icon and set the settings for another user?

    No, unfortunatly the ipad is designed to be a single user device.

  • CAN I SEND SEVERAL PDFs AT THE SAME TIME ?

    I NEED TO SEND ALL THE CHAPTERS OF A BOOK, WHICH ARE ALREADY  PDFs, AT THE SAME TIME. HOW CAN i DO THIS?

    I would suggest using a Cloud service such Dropbox , SugarSync, MyFlare, 4 Shared, One Drive. Create a Share Link and copy the link into an email.

Maybe you are looking for