Memory is not reclaimed after deleting element through deleteDocument

Hi,
I am using xmldb 2.3.10 in a large setup. Periodically db versions are created. While trying to purge the versions I am not able to see the memory usage going down until I restart the app. But after purging the versions and then restarting the app I can see huge memory gain. Can you please suggest ways to handle the same without restart.
Here is what I am doing:
Input : XmlTransaction& txn and integer type lastVersionToPurge
/*Code for xquery*/
string xquery;
xquery.append(" for $i in collection('").append(getName()).append("')");
xquery.append(" where $i/dbxml:metadata('").append(XdbConstants::METADATA_HIGH_DBVERID)
.append("')<=").append(Utils::uintToStr(lastVersionToPurge));
xquery.append(" return $i");
XmlQueryContext qc = getXmlManager().createQueryContext();
qc.setEvaluationType(XmlQueryContext::Lazy);
XmlResults res = getXmlManager().query(txn, xquery, qc, DBXML_LAZY_DOCS);
XmlDocument doc;
while (res.next(doc)) {
string docId = doc.getName();
//Setting up a boolean flag for metadat and ...
XmlUpdateContext uc = getXmlManager().createUpdateContext();
container_->deleteDocument(txn, docId, uc);
Now issue is that the process containing xmldb is approx 1GB before purging these versions. If without purging these version I restart the process there is not significant reduction in memory usage but if I restart the process after purge I can see huge reduction in memory footprint of containing process. Since restart of containing process includes stop/start of dbxml, is it possible to only restart the xmldb after the purge? If so what are the api's. If no are there other alternatives that do not require a restart of containing process.

Thanks a lot for your response Luca. Here are the environment/XML Manager configuration :
Env : DB_CREATE|
DB_INIT_MPOOL|
DB_INIT_TXN|
DB_INIT_LOCK|
DB_INIT_LOG|
DB_RECOVER |
DB_THREAD |
DB_SYSTEM_MEM |
DB_INIT_REP| DB_LOCK_DEFAULT | DB_LOG_AUTOREMOVE |
XML config :
DBXML_ALLOW_EXTERNAL_ACCESS|
DBXML_ADOPT_DBENV
Please let me know if you any further info is needed. In case I have not answered your question correctly, lease let me know how I can fetch correctly from my code base.
Thanks a lot. Appreciate your help.

Similar Messages

  • Table space not reduce after delete in oracle 11G

    Hi Team,
    I have a DB 11.1.0.7 on unix.
    I have execute delete tables on tablespace, but this not reduce.
    Thanks

    935299 wrote:
    What segment space management type is defined for the tablespace in question?
    MANUAL
    Then you should check out the documentation some more.
    But even if you shrink the table segement what is that going to do for the data file size?
    I don't undertand you.
    ThanksYour thread is titled "Table space not reduce after delete in oracle 11G" which implies to me that you are interested in reducing the size of a tablespace (which really means reducing the size of the underlying datafile(s)).
    So, if you shrink the size of the sys.aud$ table, will that cause the datafile(s) to become smaller? Will it accomplish your goal? What else, if anything, needs to happen?

  • PO Release Strategy not changed after deletion of few line items with less

    Subject : PO Release Strategy not changed after deletion of few line items with less Total PO
    Dear Friends
    We have issue with PO Release strategy. We have created the PO. with release strategy  with multiple approvers.  After approval of first approval manager , one of the PO line item got deleted and Total PO value is reduced . The new PO value should have changed the PO release strategy. But it is not changed. Old release strategy only showing in the PO which is wrong. 
    Details of the PO
    PO no 4500000123 with 5 line items Total PO value : 100,000 USD Release strategy : AB
    PO line item 5 deleted. Now total PO value changed to 50,000 USD and the PO release strategy should have been changed to AA but not changed. Still showing PO release strategy AB only.
    Are there any OSS notes available to correct his bug.
    Please let me know if you need more details
    Thanks in Advance
    Thanks
    MVS

    Hi,
    release indicators  change it to 4.It may works. Please explore to all 6 indicators..........
    i.e,
    1-cannot be changed
    2-changable,no new determination of strategy
    3-changable,new release in case of strategy
    4-changable,new release in case of strategy or value change
    5-changable,new release if new strategy/outputted
    6-changable,new release if new strategy or value changed/ outputted......
    And check   Characteristic description and value in Classification  of Release strategies ........
    I hope this will help you. Thanking you.
    Regards,
    Venkat.

  • Percentage of used table space not reduce after deletion

    Hi..
    This is my query to delete data from database:-
    delete from $tb_data where to_char(partition_dt,'MON') = '$mm';
    The $tb_data and $mm is variable and the $tb_data will be read input table name (as example backup_nx160, backup_ngn and etc) and the $mm will be capture the input month.
    My question is why the percentage of used table space is not reduce after delete query was executed. Could somebody help me..
    Please help me..
    Thank you,
    Baharin

    baharin wrote:
    Hi..
    Is it the deleted space will be reused by the system ?Yes.
    .. How could i check the real free tablespace or real usage table space ?If you have gathered statistics on the schema recently, then sum (avg_row_len*num_rows) should give you the exact number of bytes that are being consumed - assuming all tables are in a single tablespace under consideration. You can subtract this value from sum (dba_data_files.bytes) figure for the tablespace, to know exact free space.

  • How do I fix Error Message = Out Of Memory Could Not Install or Delete Data"

    I have looked all over the internet and there is a lot of discussion about WHY this happens and a lot of discusion about what to do in the future to avoid this from happening.
    I need help with specific steps on how to delete the static image that is stuck on my desktop. The image is large and covers most of my screen. I have shut down, unplugged, let the machine rest....started up several times. Not working.
    The error reads "OUT OF MEMORY - COULD NOT INSERT OR DELETE DATA"
    Thanks!

    Probably you are running out of disk space. Can you interact with your Mac at all, or is the error  message preventing you from using Finder windows?
    I'd try to boot into Save Mode: This will only load a rudimentary version of Max OS X, needing less space, and will clean some caches. The Start Up will tale longer, however.
    When in Save Mode try to empty the Trash and to free as much disk space as you can, by deleting files.
    How much free disk space do you have right now?
    See:
    http://www.wikihow.com/Start-Your-Mac-in-Safe-Mode
    If you cannot access the FInder to free disk space, even in Save Boot Mode, post back.
    Regards
    Léonie

  • PE 9 will not load after installing Elements 10

    Installed Elements 10 on Vista 64-bit.  Did not uninstall Elements 9.  Now PE 9 will not load; get window Adobe Premiere Elements.exe - No Disk.  There is no disk in the drive. Please insert a disk into drive\Harddisk2\DR2.  Tried disk 2 of 3 from package, nothing happens.

    Tried twice, PE9 still locked up both times - I think the intent is to have me try PE10, because that did work!!!
      From: Steve Grisetti
      Sent: Monday, January 02, 2012 7:09 PM
      To: cptiger
      Subject: PE 9 will not load after installing Elements 10
            Re: PE 9 will not load after installing Elements 10
            created by Steve Grisetti in Premiere Elements - View the full discussion

  • Netweaver BI 7.0 on DB6, Space not reclaimed after PSA deletion

    Hi,
    We recently moved from Oracle to DB6 ( DB2 9.7.0 on AIX) for our Netweaver BI 7.0 system. Previously when we schedule the PSA deletion jobs we will see the benefits that the space is reclaimed, but now on DB6  we dont see that the space is reclaimed after PSA deletion. The DB size went up by whooping 30 GB in one month which was not expected.Please advice.
    Thanks in advance
    Siva

    Hi Debanshu,
    This is specific to DB6.
    To 'reclaim' the storage (no matter what is the activity after which you expect some storage to be 'freed'), this is the procedure you have to carry out. Also, try to study about High water mark in detail.
    http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.dbobj.doc%2Fdoc%2Ft0055375.html
    http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.dbobj.doc%2Fdoc%2Fc0055392.html
    Following very helpful link already provided -
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20057ef0-7952-2c10-949f-decd4fcbb392
    Thanks

  • PSE9 Organizer will not open after deleting LTR3

    After deleting my registered LTR3 today and am  now unable to open the previously installed and registered PSE9 Organizer program. PSE9 does open to the desktop "Welcome to PSE9" page. The EDIT program will open, the ORGANIZER will not. Howerer, the Organizer does appear in the lower taskbar and will open to a thumbnail but not to an open program for use. Help anyone?
    Thanx, Stv.

    Bypass the Unwelcome Screen by creating Desktop shortcuts for the Organizer and the Editor, and restarting your computer.
    The Editor's executable is:
    "C:\Program Files (x86)\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe"
    The Organizer's executable is:
    "C:\Program Files (x86)\Adobe\Elements 10 Organizer\PhotoshopElementsOrganizer.exe"
    The Unwelcome Screen leaves a zombie process running which prevents the actual program from launching again.
    Ken

  • Free disk space not changing after deleting (large) photos

    Hi,
    I wasn't sure whether to post this on the iPhoto board or on the MBA one, since it's not clear if it's a system-level issue or not. Anyway, I had about 30GB of free space on my 256GB MBA and the other day I deleted four or five albums of photos from my DSLR that I'd downloaded to my computer, after I made backups of them elsewhere. In total there were about 3,500 photos, roughly 24MB each on average. I made sure that after deleting them, I deleted my iPhoto Trash as well as the system Trash. Neverless, my level of free space hardly budged and if anything, it decreased slightly. I've read several threads saying to wait a while as sometimes the system takes a delay to adjust - that's fine.
    It's now almost five days later and the situation remains the same, if not worse. I ran DaisyDisk and aside from the usual large folders (my movies in iTunes etc, none of which had been added to since I deleted all those photos), the only one I couldn't recognise was this folder iLifeAssetManagement (9GB). I know that there are a few threads about this one, and most people seem to suggest you can clear this if you're happy to lose the content in your Photo Stream. The thing is, I've looked through some of the images in this folder and I'm quite positive that a number of them are from the DSLR albums (there are CR2 files, which I believe is Canon's exclusive RAW format). Some of the others are definitely from my iCloud Photo stream. I'm more than glad to lose all the DSLR ones, though I'd like to keep the iCloud ones and I don't really want to have to sort through 5,000-odd files. I'm positive that this folder is related to why I never gained that free space.
    Has anybody else had issues like this and any suggestions for clearing this folder of all the files I already meant to delete, whilst keeping the others? Or have you had issues relating to this? Any help much appreciated.
    Thanks.

    If you've installed third-party software called "Disk Drill," I suggest you remove it according to the developer'sinstructions. If you prefer to keep the software, refer to the developer for support. Otherwise, see below.
    You may notice a difference in available space statistics between Disk Utility, Finder, and Get Info inspectors. This is expected and can be safely ignored. The Finder displays the available space on the disk without accounting for the local snapshots, because local snapshots will surrender their disk space if needed.
    About Time Machine's "local snapshots" on portable Macs

  • Table space not reduce after delete in oracle 10g

    Hi..
    Based on my system, i have found that my oracle table space did not reduce after the deletion query. Why ?.. Could somebody help me. As your info, I am using oracle 10g.
    Thank you,
    Baharin

    After Delete the table space will not be set free. high water mark will not be reset. to regain the space you need to recognize the objects from which you deleted the data. This can be done in many ways.
    1) Move the objects.
    Alter table temp move --> optionally tablespace clause can be used. After this you need to rebuild table indexes.
    2) With 10g table can be shrinked or reorganize to free the space.
    alter table mytable enable row movement;
    alter table mytable shrink space;
    3) Export/Import
    export the objects and drop and recreate with import.

  • Table size not reducing after delete

    The table size in dba_segments is not reducing after we delete the data from the table. How can i regain the space after deleting the data from a table.
    Regards,
    Natesh

    I think when you do DELETE it removes the data but
    it's not releasing any used space and it's still
    marked as used space. I think reorganizing would help
    to compress and pack all block and relase any unused
    space in blocks. Why do you think that? Deleting data will create space that can be reused by subsequent insert/ update operations. It is not going to release space back to the tablespace to make it available for inserts into other tables in the tablespace, but that's not generally an issue unless you are permanently decreasing the size of a table, which is pretty rare.
    Would you also please explain about different about
    LOB and LONG ? or point me to any link which explain
    baout it.From the Oracle Concepts manual's section on the LONG data type
    "Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases."
    LONG was a very badly implemented solution to storing large amounts of data. LOBs are a much, much better designed solution-- you should always be using LOBs.
    Justin

  • TABLE SIZE NOT DECREASING AFTER DELETION. BLOCKS NOT BEING RE-USED

    Hi ,
    Problem:
    Table size before deletion: 40GB
    Total rows before deletion: over 200000
    Rows deleted=190000 rows
    Table size after deletion is more (as new data was inserted meanwhile).
    Purpose of table:
    This table is a sort of transaction table.
    Whenever an SR is raised by CSR, data gets inserted into this table and is removed when the status is cleared.
    So there is constant insertion and purging will happen on this table.
    We are using ASSM and tablespace is LOCAL.
    This Table has a LONG column also.
    Is this problem because of LONG column ?
    So here there are 2 problems.
    1) INSERTs are not using the space created by DELETE.
    2) New INSERTs are taking much more space then expected ?
    Let me have your suggestion
    Thanks,

    I think when you do DELETE it removes the data but
    it's not releasing any used space and it's still
    marked as used space. I think reorganizing would help
    to compress and pack all block and relase any unused
    space in blocks. Why do you think that? Deleting data will create space that can be reused by subsequent insert/ update operations. It is not going to release space back to the tablespace to make it available for inserts into other tables in the tablespace, but that's not generally an issue unless you are permanently decreasing the size of a table, which is pretty rare.
    Would you also please explain about different about
    LOB and LONG ? or point me to any link which explain
    baout it.From the Oracle Concepts manual's section on the LONG data type
    "Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases."
    LONG was a very badly implemented solution to storing large amounts of data. LOBs are a much, much better designed solution-- you should always be using LOBs.
    Justin

  • The number of leaf_blocks does not decrease after delete

    hi All,
    this the example from Tom's book <<expert oracle database architecture>>, may anyone explain why the leaf_block oes not decrease to 523 after delete.
    db version is 10.2.0.3, SEGMENT SPACE MANAGEMENT MANUAL in the tablespace system
    sys@CS10G> drop table big_table purge;
    Table dropped.
    sys@CS10G> @big_table
    Table created.
    Table altered.
    Enter value for 1: 500000
    old   3:     l_rows number := &1;
    new   3:     l_rows number := 500000;
    Enter value for 1: 500000
    old   9:         where rownum <= &1;
    new   9:         where rownum <= 500000;
    PL/SQL procedure successfully completed.
    Table altered.
    PL/SQL procedure successfully completed.
      COUNT(*)
        500000
    sys@CS10G> declare
      2  l_freelist_blocks number;
      3  begin
      4  dbms_space.free_blocks
      5  (
      6  segment_owner => user,
      7  segment_name => 'BIG_TABLE_PK',
      8  segment_type => 'INDEX',
      9  freelist_group_id => 0,
    10  free_blks => l_freelist_blocks
    11  );
    12  dbms_output.put_line(' block on freelist = ' || l_freelist_blocks);
    13  end;
    14  /
    block on freelist = 0
    PL/SQL procedure successfully completed.
    sys@CS10G> select leaf_blocks from user_indexes where index_name = 'BIG_TABLE_PK';
    LEAF_BLOCKS
           1043
    sys@CS10G> delete  from big_table where id <= 250000;
    250000 rows deleted.
    sys@CS10G> commit;
    Commit complete.
    sys@CS10G> declare
      2  l_freelist_blocks number;
      3  begin
      4  dbms_space.free_blocks
      5  (
      6  segment_owner => user,
      7  segment_name => 'BIG_TABLE_PK',
      8  segment_type => 'INDEX',
      9  freelist_group_id => 0,
    10  free_blks => l_freelist_blocks
    11  );
    12  dbms_output.put_line(' block on freelist = ' || l_freelist_blocks);
    13  end;
    14  /
    block on freelist = 520
    PL/SQL procedure successfully completed.
    sys@CS10G>
    sys@CS10G> select leaf_blocks from user_indexes where index_name = 'BIG_TABLE_PK';
    LEAF_BLOCKS
           1043Edited by: Sidney Chen on Aug 15, 2009 3:10 PM

    Sidney Chen wrote:
    hi All,
    this the example from Tom's book <<expert oracle database architecture>>, may anyone explain why the leaf_block oes not decrease to 523 after delete.It's just the way it works - when a leaf block is emptied it is linked into the freelist, but also stays linked into the correct place in the index structure. It will be detached from the structure by a coalesce, or when Oracle needs to use a free block to handle new data.
    If you want a couple of reasonable guesses why:
    <ul>
    a) it probably makes read-consistency of indexes easier to deal with
    b) unlinking a block from the structure is expensive (you have to modify the blocks to the left, the right, and above) so Oracle takes the gamble that you're likely to re-insert data in the same block in the near future.
    </ul>
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan

  • Disk Space not restored after deleting iphone backup

    Hi,
    Today while restoring my iphone i realised that itunes had made multiple copies of ~3gb of my iphone data. Since my iphone was restored successfully I decided to remove all the backups and make a fresh new backup. After deleting the multiple backups I found that my available disk space had not increased at all. I even went to ~/Library/Application Support/MobileSync/Backup and ther was nothing in there. So I went ahead and made a new backup which consumed additional ~3gb. And just to test if it was only itunes that was doing this I deleted my photos from iphoto ~5gb and even that did not give me back my 5gb. I went to trash and I dont have anything there.
    So, here I am confused as to where my deleted stuff is going to because it does not seem like its getting deleted.
    Anything that i can do get my space back?
    Thanks,
    Yogi

    Local snapshots are hidden copies of files that have been changed or deleted in between Time Machine snapshots. They are stored in free space that would otherwise be unused, and therefore wasted. The space occupied by the snapshots is managed automatically. When free space starts to run low, the snapshots are deleted. The Finder reports the space occupied by local snapshots as "Available," which it is.
    If there are unwanted changes to your files in between Time Machine snapshots — which may be far apart when you're moving around with a portable computer — you may be able to revert the changes from a local snapshot. If you disable local snapshots, you lose that protection, and you gain nothing. There is no offsetting benefit whatsoever; merely added risk.
    Empty storage space is simply wasted. You paid for it to be there, but it's doing you no good at all. Local snapshots put it to use.
    Very rarely, if ever, you might need to delete the local snapshot store in order to add a large amount of data all at once. If that need ever arises, which it probably won't, all you have to do is turn Time Machine OFF in its preference pane, and then turn it back ON immediately.
    You should ignore the bad advice that circulates on this site to disable local snapshots permanently by running a shell command. If you ran such a command, ask for instructions on how to reverse it.

  • Jar file is not working after deleting all packages from the same directory

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

Maybe you are looking for

  • How to find a lost word document

    I was working on a document on Friday 23rd May, saved it and closed it as usual. Today is Sunday 25th and I have tried to access the document. I have gone to recrntly opened documents on Word for Mac. The usual icon has disappeared and in it place wa

  • Tracking report views on BOEXI

    Post Author: adammlange CA Forum: Administration I understand that BOEXI has audit tables that you can use to track logons, scheduled reports, and so on.  Can you also track everytime someone views a report on BOEXI?  I am not as interested in tracki

  • IPOD - flashing red in itunes won't read or write

    I seem to be having a major problem. After updating to 10.4.2 the ipod was sluggish when adding songs. My Ipod was wiped clean in itunes 5 then I had a folder with an exclamation point - followed all the advice reformatted etc. I was able to load 3 s

  • Selling iMac, how to setup software

    I'm selling my G3 iMac, and would like to install the software so that no name is on the computer, just like when you first buy it. Ideally, I'd like the buyer to get the setup assistant the first time they boot up. I'll be installing 10.2. The other

  • Change documents in WTY after the Claim is "complete"

    Dear All, In WTY transaction, I am unable to view the change documents (Extras --> Change Documents) after the Claim is flagged off as "Complete" Is there a way to overcome this ? Thanks. Raj