Bad performance when iterating/updating the rows of a tree table

Hello,
we have a tree table based on a VO and EO (with transient attributes). One of the attribute is a flag.
The VO is populated with a complex query having many thousands of rows.
Now, when the user clicks on a parent node, all the children are updated (their flag is set to true) recursively.
This is really really slow. It might require several minutes, while a similar update via PL/SQL on a real table would required few seconds.
Is there any way to improve the performance? We have already applied all the tunings on both the EO and VO mentioned in Oracle Documentation, but they had almost no effect:
- retain viewlink row set iterators
- query hints
- Use update batching
The algorithm we use is the following:
    private void checkTreeNodes(JUCtrlHierNodeBinding node, Boolean check) {
        if (node == null) {
            return;
       TreeVORowImpl nodeRow = (TreeVORowImpl)node.getRow();
        if (nodeRow != null) {
                nodeRow.setFlag(check);
        List<JUCtrlHierNodeBinding> children = null;
        if (!nodeRow.getLevel().equals("4"))  // no more than 4 levels
            children = node.getChildren();
        if (children != null) {
            for (JUCtrlHierNodeBinding _node : children) {
                checkTreeNodes(_node, check);
    }

Thanks for you answer.
I am trying to move the logic in a method of the AM. But I have an exception (jdev 11.1.2.1):
    public void checkTreeNodes(TreeVORowImpl node, Boolean check, int level) {
        if (node == null)
            return;
        node.setFlag(check);
        if (level >= 4)
            return;
        Key key = new Key(new String[] { node.getId() }); // Id is the primary Key
        // By debugging via System.out.println, the code stops here:
        RowIterator rowIt = getMyVO().findByAltKey("ParentId", key , -1, false); // children have ParentId = Id
        while (rowIt.hasNext()) {
            TreeVORowImpl row = (TreeVORowImpl)rowIt.next();
            checkTreeNodes(row, check, level + 1);
    }findByAltKey gives the following exception (since it's called from the UI by getting the AM from DataControl):
oracle.jbo.InvalidObjNameException: JBO-25005: [...]
     at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:573)
     at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:504)
     at oracle.adf.model.binding.DCBindingContainerState.validateToken(DCBindingContainerState.java:684)
Do you see anything wrong or not efficient?
Thanks.

Similar Messages

  • Bad performance when open a bi publisher report in excel

    We use bi publisher(xml publisher) to create a customized report. For a small report, user like it very much. But for a bigger report, users complain about the performance when they open the file.
    I know it is not a native excel file, that may cause the bad performance. So I ask my user to save it to a new file as a native excel format. The new file still worse than a normal excel file when we open it.
    I did a test. We try to save a bi publish report to excel format, the size shrink to 4Mb. But if we "copy all" and "Paste Special" value only to a new excel file, the size is only 1Mb.
    Do I have any way to improve that, users are complaining everyday. Thanks!
    I did a test today.
    I create a test report
    Test 1: Original file from BIP in EBS is 10Mb. We save it in my local disk, when we open the file, it takes 43 sec.
    Test 2: We save the file in native excel format, the file size is 2.28Mb, it takes 7 sec. to open.
    Test 3: We copy all cell and "PasteSpecial" to a new excel file with value only. The file size is 1.66Mb, it takes only 1 sec to open.
    Edited by: Rex Lin on 2010/3/31 下午 11:26

    EBS or Standalone BIP?
    If EBS see this thread for suggestions on performance tuning and hints and tips:
    EBS BIP Performance Tuning - Definitive Guide?
    Note also that I did end up rewriting my report as PL/SQL producing a csv file and have done with several large reports in BIP on EBS.
    Cheers,
    Dave

  • Deadlock when updating different rows on a single table with one clustered index

    Deadlock when updating different rows on a single table with one clustered index. Can anyone explain why?
    <event name="xml_deadlock_report" package="sqlserver" timestamp="2014-07-30T06:12:17.839Z">
      <data name="xml_report">
        <value>
          <deadlock>
            <victim-list>
              <victimProcess id="process1209f498" />
            </victim-list>
            <process-list>
              <process id="process1209f498" taskpriority="0" logused="1260" waitresource="KEY: 8:72057654588604416 (8ceb12026762)" waittime="1396" ownerId="1145783115" transactionname="implicit_transaction"
    lasttranstarted="2014-07-30T02:12:16.430" XDES="0x3a2daa538" lockMode="X" schedulerid="46" kpid="7868" status="suspended" spid="262" sbid="0" ecid="0" priority="0"
    trancount="2" lastbatchstarted="2014-07-30T02:12:16.440" lastbatchcompleted="2014-07-30T02:12:16.437" lastattention="1900-01-01T00:00:00.437" clientapp="Internet Information Services" hostname="CHTWEB-CH2-11P"
    hostpid="12776" loginname="chatuser" isolationlevel="read uncommitted (1)" xactid="1145783115" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
               <inputbuf>
    UPDATE analyst_monitor SET cam_status = N'4', cam_event_data = N'sales1', cam_event_time = current_timestamp , cam_modified_time = current_timestamp , cam_room = '' WHERE cam_analyst_name=N'ABCD' AND cam_window= 2   </inputbuf>
              </process>
              <process id="process9cba188" taskpriority="0" logused="2084" waitresource="KEY: 8:72057654588604416 (2280b457674a)" waittime="1397" ownerId="1145783104" transactionname="implicit_transaction"
    lasttranstarted="2014-07-30T02:12:16.427" XDES="0x909616d28" lockMode="X" schedulerid="23" kpid="8704" status="suspended" spid="155" sbid="0" ecid="0" priority="0"
    trancount="2" lastbatchstarted="2014-07-30T02:12:16.440" lastbatchcompleted="2014-07-30T02:12:16.437" lastattention="1900-01-01T00:00:00.437" clientapp="Internet Information Services" hostname="CHTWEB-CH2-11P"
    hostpid="12776" loginname="chatuser" isolationlevel="read uncommitted (1)" xactid="1145783104" currentdb="8" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
                <inputbuf>
    UPDATE analyst_monitor SET cam_status = N'4', cam_event_data = N'sales2', cam_event_time = current_timestamp , cam_modified_time = current_timestamp , cam_room = '' WHERE cam_analyst_name=N'12345' AND cam_window= 1   </inputbuf>
              </process>
            </process-list>
            <resource-list>
              <keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor" indexname="IX_Clust_scam_an_name_window" id="lock4befe1100" mode="X" associatedObjectId="72057654588604416">
                <owner-list>
                  <owner id="process9cba188" mode="X" />
                </owner-list>
                <waiter-list>
                  <waiter id="process1209f498" mode="X" requestType="wait" />
                </waiter-list>
              </keylock>
              <keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor" indexname="IX_Clust_scam_an_name_window" id="lock18ee1ab00" mode="X" associatedObjectId="72057654588604416">
                <owner-list>
                  <owner id="process1209f498" mode="X" />
                </owner-list>
                <waiter-list>
                  <waiter id="process9cba188" mode="X" requestType="wait" />
                </waiter-list>
              </keylock>
            </resource-list>
          </deadlock>
        </value>
      </data>
    </event>

    To be honest, I don't think the transaction is necessary, but the developers put it there anyway. The select statement will put the result cam_status
    into a variable, and then depends on its value, it will decide whether to execute the second update statement or not. I still can't upload the screen-shot, because it says it needs to verify my account at first. No clue at all. But it is very simple, just
    like:
    Clustered Index Update
    [analyst_monitor].[IX_Clust_scam_an_name_window]
    cost: 100%
    By the way, for some reason, I can't find the object based on the associatedObjectId listed in the XML
    <keylock hobtid="72057654588604416" dbid="8" objectname="CHAT.dbo.analyst_monitor"
    indexname="IX_Clust_scam_an_name_window" id="lock4befe1100" mode="X" associatedObjectId="72057654588604416">
    For example: 
    SELECT * FROM sys.partition WHERE hobt_id = 72057654588604416
    This return nothing. Not sure why.

  • I'm trying to open my itunes but it won't do so. I think it all started when I updated the software on my computer............what do I do?

    I'm trying to open my itunes but it won't do so. I think it all started when I updated the software on my computer............what do I do?

    How are you attempting to open iTunes, and can you describe exactly what happens when you do?
    Do you recall just what software update you performed?

  • HT1386 When i connect my iPhone to iTunes, it says i have to set up my iPhone, and wont allow me to sync any media i have already purchased on it. My phone is not new, so I dont understand? This all came about when i updated the iOS 6 software.

    When i connect my iPhone to iTunes, it says i have to set up my iPhone, and wont allow me to sync any media i have already purchased on it. My phone is not new, so I dont understand? This all came about when i updated the iOS 6 software. I have tried to re-set up my phone but it makes no difference and deletes everything off my phone.

    bubblesblom wrote:
    Okay, so my friends think it is funny to change the passcode on my iPhone.
    Maybe you should get new friends.
    I'm not sure that recovery mode works when you have to trust the computer, but did you try it?
    If you can't update or restore your iOS device - Apple Support
    If that won't work, perhaps you can use Find my iPhone from a computer in your iCloud.com account to erase the device.
    iCloud: Erase your device - Apple Support
    This has nothing to do with the Find my iPhone app being installed on the phone, but you do have to have Find my iPhone activated in the iCloud settings on the phone.

  • I have the iPhone 4. and when I updated the software to iOS6 My notifications don't make a sound anymore, the only sound that I get are text messages, or Email. I checked to see if the other apps were muted and they weren't. How do I fix this??

    I have the iPhone 4. and when I updated the software to iOS6 My notifications don't make a sound anymore, the only sound that I get are text messages, or Email. I checked to see if the other apps were muted and they weren't. How do I fix this

    You cannot update iPhone 4 to IOS 8.1.2, the highest you can update is IOS 7.1.2.
    Unless you've iPhone 4S (looks similar to iPhone 4)

  • I can't get the page numbers in my table of contents to update when I update the book.

    I'm using Framemaker 11 and I have two TOCs in my book: one in English and one in French. Each TOC links to different documents in the same book. The reference page for each TOC is set and correctly displays the heading 1 and 2 I've told it to display, but the numbers do not update when the content in my document files changes to a different page. I've checked the conditional text settings in my document files; they are correct. When I update the book, I choose to update Numbering, All Cross-References, All Text Insets, OLE Links, Generate Table of Contents, Lists, and Indexes. What am I doing wrong? Thanks.

    I just tested this out and saw the same result as Rick - a book with child books ignores all generated files within the child books. This applies to adding content from them (e.g. their titles) to actually including them in the output. This applies to all versions of FM since v.9!
    However, there is a workaround for this. You need to use the hierarchical book structure in the parent book and create Folders for each book that you want to add. Then manually add the generated files (TOC, IX, List of..., etc.) and book to the respective folder. This is what it looks like for two child books in a parent book:
    Note that the child book generated files (TOC, IOR) show as just regular files at this point in the parent book. To get the page numbering to be continuous throughout the parent book, you will need to make a couple of passes. First set folder, files and books to have the Numbering continue from the previous (if you want all sequential page numbers). This will set the page numbers correctly except for what they were in the respective book TOCs. You will need to use the starting page number of the child TOC files in each folder (it shows in the Book status bar when click on the TOC file in the master/parent book).
    To set the individual book TOCs to be correct in the parent book, open the child book and set the TOC Numbering to start at the page stated in the parent book (status bar). Now update the child book to set the correct (parent book) page numbers in the child TOC. [This is a necessary manual step, as the page number assigned in the parent book is ignored when th child book is individually updated and FM uses 1 to start off the sequence in the child book.]  Repeat for each child book in the master/parent book.
    The final step is to Update the parent book and create the PDF. You should now have all of the files included in the PDF and the child TOCs should show the correct page numbers of the master book.
    This whole process of books within books seems a bit borked and one shouldn't have to be jumping through hoops to include child generated files. Please report this as a bug via: https://bugbase.adobe.com/index.cfm

  • I have a problem when you update the iPhone

    I have a problem when you update the iPhone does not complete the update and the bar that appears in the top of iTunes (restoring iphone software)

  • My dad and i have the same icloud id,when i updated the software (to ios 8.1.3) i have my dad´s photos on my iphone.And want my photos back (i tried restoring my phone from the last backup) but still have my dad´s photos on my device.

    My dad and i,have the same icloud id,when i updated the software (to ios 8.1.3) i have my dad´s photos on my iphone.And want my photos back (i tried by restoring my phone from my last backup)but still have my dad´s photos in my device

    And that's exactly the problem, because everyone should have their own account for iCloud. You can share an Apple ID for iTunes & App Store purchases, but you shouldn't do that for iCloud (Mail, Calendar, Contacts etc. ... ...and Photos). The problem of using the same account together could mean that only your dad's photos were stored.

  • I have an iphone 5 ana i buy it unlocked and when i update the ios to 7.1 the iphone is locked .why?

    i have an iphone 5 ana i buy it unlocked and when i update the ios to 7.1 the iphone is locked .why?

    Probably because the previous owner had the phone hacked to unlock it, and when you updated it locked back to the original carrier.
    Only the carrier that the phone is locked to is authorized to unlock it.
    If the previous owner had the carrier unlock it, you wouldn't have any issues.

  • FRM-92101 error,when i update the PLL file.

    when i update the pll file,the form of called the pll wasn't open,FRM-92101 error.
    i must recompile the form, then it can open.
    why ? how can i resolve this problem?

    Hi,
    I think that this has to do with the PLL signature. If you only update the content of an existing pll file then this should go without. If you change the signature (e.g. method arguments or method number) then this has an impact to the internal structure,
    Frank

  • When i updated the software on a new computer i lost my purchased apps and music how do I get them back

    I purchased a new laptop and tried to move my itunes to it .when I updated the software I didnt get my purchased apps and it wiped out my loaded music library can I get it back

    Works for music purchases, too.
    iTunes 10 for Mac: Download previous purchases from the iTunes Store:  http://support.apple.com/kb/PH1706

  • Help!!!when i update the iphone4 to ios5,the iphone4 cannot  calling  !

    help!!!when i update the iphone4 to ios5,the iphone4 cannot  calling  !

    Very likely so; users want new features and the room needed to implement existing features rarely goes down.

  • When i update the ios 8.2 new apps for apple watch i dont have

    When i update the ios 8.2 new apps for apple watch i dont have.please advice

    It was the first thing mentioned in the update description that came up before you chose to click 'Accept'. iOS8.2
    You accepted, therefore you have it. Simply put it at the end of your Apps as I have done with Apps I did not want e.g.. Health, Tips, Compass etc.
    Pete

  • HT4623 I am getting an error messae when I update the iOS

    I am getting an error messae when I update the iOS

    Sorry don't recall. But it's OK. working now. Thanks for responding

Maybe you are looking for

  • How to compile a report in windows

    Dear Memebers, Generally standard reports contain a lot of user exits as a results of which we cannot compile the reports using reports builder. How can we compile a standard report in windows. I know the syntax which is shown below but how should i

  • How to fix the position of JInternal frames added in JFrame

    Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there

  • How can I export an external calendar to my Apple calendar on the Macbook? ie: Airbnb Calendar.

    Can anyone help? I would like the schedule information on the Airbnb site Calendar to appear on he Macbook. So far i've been able to manage it on the iphone but not the computer.  Thank you!

  • Lookalike between Windows and Mint

    This is so simple and so hard to explain. So I'm gonna use a simple screenshot : [http://hfr-rehost.net/http://self/pic/bfb4d49367138a1c4f7cf874dc6af6b276ebc00d.jpeg link text] As you can see here, the orange menu button is on the same line as all my

  • How to open lightroom 5

    When I try to open Lr 5, I can only get he page with very basic editing;  I can go no futher.  Help?