Mass delete and performances

Hi,
we use a few tables to log access to our various e-commerce sites.
Now some of these tables are very large (20-50 millions row) so we decided to remove old data after having consolidated it.
However deleting a large number of rows takes a long time (it took about 18 minutes to remove 2millions).
We're removing all rows with primary key less than x (key is an integer).
Does a method exists to mass delete with better performances (maybe disabling logging or ....) ?
If not, can I send a delete statement that will run on background (i.e. disconnecting the client) possibly at a lower priority ?
Rows are always inserted with primary key greater than x (it's a db sequence) so delete and insert never conflicts.
Thank you

Hi Andrea,
I know that this might come a bit too late for your scenario, but how about this?
For your logging table you could implement something like a poor-mans-partitioniong yourself.
Instead of one big table, you create a table for each, say quarter yourself.
You also create a synonym to he currently used "write-into-this" partition, so that your logging trigger doesn't have to be changed when the new partition should be used.
On top of that you create a UNION view over all partitions.
With that your requirements for logging everything should be fulfilled and (since you don't have to take care about updates) you can keep the active partition small and get rid of old data very fast (drop table/truncate table).
If you go for the "truncate table" (which is pretty much the same as a "drop table" for MaxDB) then you can also think about having a fixed set of tables (Q1, Q2,... Q7, Q8) that you write to in a round-robin fashion. This would then be a kind of moving-window into your logging history.
The only thing to take care of here is that you'll need to have a small time-slice in which you change the synonym every quarter.
Just my two pence on this...
regards,
Lars

Similar Messages

  • Physical Inventory documents mass delete and reference in material document

    Dear Experts,
    I have 3 questions,
    1. Is there any option to mass delete physical Inv documents
    2. How can i know if the physical inventory documents are posted  (MI07) or not yet
    3. If i see any material document of mov type 701 or 702, there is no reference of physical Inv Doc # in it. How can i know that this material document is created as a result of which physicl Inv document.
    Appreciate your help
    SAPXPT

    Hi,
    "1. Is there any option to mass delete physical Inv documents"
    Yes You can delete the Physical Inv Documents with MIAD but for that you need to maintain one variant with it and copy all the Document no. in TEXT file paste in the in Archiving Selection's.
    "2. How can i know if the physical inventory documents are posted (MI07) or not yet"
    Please check ISEG table and provide the time Period as search menu so that you can see all the Doc's posted on today's date.
    "3. If i see any material document of mov type 701 or 702, there is no reference of physical Inv Doc # in it. How can i know that this material document is created as a result of which physical Inv document."
    go to MB59 and check the Material documents with respect to Movement type and date. and the difference you will see in MMBE as per the movement used.
    Regards,
    Ninad Kshirsagar

  • Upgraded to 7.0.2 - Duplicates made of my 47,000 songs - how to mass delete

    I upgraded to 7.0.2 of Itunes - for some reason none of my songs were recognized on my external drive - could not play any songs - reconverted to AAC - now I have duplicates of 47,000+ songs - want to erase the versions that won't play - the one's with the little "!" and gray circle around it - is there a way to mass delete and put everything back in order - without going through each song to delete "unrecognizable" version? All my playlist now have the version that doesn't play (with the playable version in library). Plus, when I reconnect to slave drive, will I encounter this problem all over again. Should I turn this Dell into a paperweight and just by a MAC? This goes along with my other question.

    I'm figuring it out a little bit - appears my music files transfered to the C: Drive - so now I have identical files on the C: Drive and the G: Drive. Want to manage all music on the G: Drive (External Hard Drive)...do I need to delete current library, delete C: Drive music files and start from scratch with existing raw, unconverted external hard drive? Or should I delete everything on the G: Drive and export everything in Itunes to there? Not sure if that'll solve my "duplicate 47,000 songs" issue.

  • Mass Delete in v2.2 Mail?

    The Software Update page for the v2.2 update (http://www.apple.com/ipodtouch/softwareupdate.html) says the Mail application has been upgraded with new management functions like Mass Delete. I've updated my iPod Touch to v2.2, but when I open the Mail applet, the Edit button doesn't offer any new options like Select All.
    Any help? What am I missing? Thanks.

    What you write is how the Mail applet functioned before in v2.1, but it doesn't track with the text on the Apple web page describing the "amazing features" of v2.2: "New Mail Management Features - Mass delete and move email messages, reply from a different account, and send with bcc." As far as I can find, the Mail applet includes none of these new features.
    For me, mass deletion of old email in the inbox is an important improvement. I don't use the Mail applet everyday. When I do and it finishes syncing up to my mail account, I'll have upwards of 150 emails that I've already seen in my desktop Outlook Express. At present, I have to select the radio button for each of these emails under the Edit function (just as you describe it) in order to clear out the inbox. "Mass delete and move" would solve this problem.
    If the "mass delete and move" feature isn't implemented in the Mail applet in v2.2, when will it?
    Thanks.

  • Mass Vendor Deletion and posting Block unblock.

    Hi All,
    I have done the mass deletion flag and posting block of vendors ate P.org and Co.code level through t.code-XK99.
    I want to retrive my changes and vendor shuold active again instead of populating a warning message.I am aware of T.Code-XK05 but i tried it through T.Code-XK99 however i am not able to unblock those vendors.
    could anyone let me know were i am ,missing.
    Regards,
    Gaurav Surana

    Transaction MASS > LFA1 is same as in XK99
    XK99 should work in your case. Please check that you are selecting the correct table and fields to be changed in this XK99 transaction.
    Are you also getting any error message during the saving in XK99?
    Regards,
    SDNer

  • Capturing the row selector and perform logical delete

    Hi All ,
    I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
    Now my problem is I cant able to capture that what are the rows need to be logically deleted :
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    update test123 set delete_flag='y' where col2=vRow ;
    end loop;
    end;
    Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
    Thanks in advance ,
    Regards,
    Debashis.

    Guys ,
    Got the solution by searhcing several of the therads from Denes...
    Create the checkbox from Form page :
    htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
    and then captured it as :
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    UPDATE table1 set DELETE_FLAG='Y'
    WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Cheers,

  • Mass deletion of users business partner and position in SRM 4.0

    Hi Experts,
    We have a requirement of deleting 1000 +  users who are locked in ECC from SRM Organization structure. For which I got the list of users who are under u201Cdeleteu201D group from table USR02. Then I found the business partner number of those users from table BUT000. Once I got the BP number I can do mass deletion of the BPs by using BUPA_DEL.
    Now, my problem is I need to mass delete the position of the users as well. If I delete it one user at a time I can go to PPOMA_BBP and select the position and delete the object.  Can anyone please help me on how can I do mass deletion of the positions of those users, its pretty urgent. I am waiting for your valuable suggestions.
    Thanks
    Div
    Edited by: Tridib Das on Sep 29, 2011 4:15 PM

    Hi Velu,
    To find the business partner or the central person id we can' go to table HRP1001 and get the central person id / business partner by inputing the parameters in the selection field as :
    Object type : CP / BP
    Rel. Obj.type: US
    ID rel. object : Give the id of the user
    this shows the object id . Anyway thanks for your help .
    Cheers
    Div

  • Mass Delete - BOM and Routing

    Hi,
    My client want to delete around 400 BOMs and Routing, there is mass delete Bom and routing?
    Can anyone tell me the deatiled steps on how to delete Bom and routing?
    Regards,
    Sankaran

    Hi,
    The below link may be helpful..
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/8d/3e4b8a462a11d189000000e8323d3a/content.htm
    Regards,
    Siva

  • Mass delete scheduling agreement and PIR

    Dear SAP Experts,
    1. My company is first time Run the MRP so i have maintain the material master MRP 1,2,3,4 tab based on the requirement.
        Currently having many old Scheduling agreements / PO is their so i am get the open goods receipt list from ME2L - based on the selection    parameter.
      I have checked the list and note the many scheduling agreement no.
      So what is the for mass delete scheduling agreement / PO ( STO, normal PO,Import PO )
      I have also try MEMASSSA - Mass delete scheduling agreement, i am select the SA item level , Copy the Agreement no, select the deletion indicator, execute and save.
    But after i have seen the list it is not updated the deletion indicator L, it is not working properly.
    Kindly share the another t.code or any other way for mass delete SA / PO 
    Thanks,
    Umapathy

    Dear Uma,
    Please check this thread. may be it can help you.  Mass deletion of PO

  • Hi guys, can you please explain how to perform automatic system scan with CleanApp - it looks like it wants me to manually chose files to delete and I just want an automatic scan (like cleanmymac does)

    Hi guys, can you please explain how to perform automatic system scan with CleanApp - it looks like it wants me to manually chose files to delete and I just want an automatic scan (like cleanmymac does)

    Slowness...First Try using Disk Utility to do a Disk Repair, as shown in this link, while booted up on your install disk.
      You could have some directory corruption. Let us know what errors Disk Utility reports and if DU was able to repair them. Disk Utility's Disk Repair is not perfect and may not find or repair all directory issues. A stronger utility may be required to finish the job.
      After that Repair Permissions. No need to report Permissions errors....we all get them.
    Here's Freeing up Disk Space.
    DALE

  • Thread-safe and performant way to return rows and then delete them

    Hi all
    I have a table containing rows to be processed by Java. These rows need to be returned to Java, then they willl be processed and sent to a JMS queue, then if that JMS operation is successful they need to be deleted from the Oracle table..
    The current method is:
    Java calls Oracle SP with 'numrows' parameter.
    Oracle SP updates that number of rows in the table with a batch ID from a sequence, and commits.
    Oracle SP returns the Batch_ID to Java.
    Java then selects * from table where batch_id = XXXX;
    Java sends messages to JMS. If JMS transaction is OK, Java deletes from table where batch_Id =xxxx and commits;
    Clearly this isn't very efficient. What I would like to do is this:
    Java calls Oracle SP with 'numrows' parameter
    Oracle SP returns that many rows in a cursor and deletes them from the table simultaneously. Oracle SP does not open a new transaction - transaction is controlled from JAva.
    Java writes to JMS. If JMS is OK, Java commits its DB transaction and thus the rows are deleted.
    Therefore there's only a single DML operation - a DELETE.
    The trouble is, this is not threadsafe - if I have two Java threads calling the Oracle SP, then thread #2 may return rows that thread #1 already got - because thread#1 has not yet committed its delete, and thread#2 can select those rows. Thread#2 will then lock waiting to delete them until thread#1 has finished its delete, then thread#2 will get "0 rows deleted". But Java will stlil have been sent those rows.
    How can I engineer this method to be as efficient as possible while still being threadsafe? The key problem I'm having is that the DELETE operation doesn't prevent the rows being SELECTed by other threads - if there was a way to DELETE without committing but also immediately make those rows unavailable to other threads, that would work I think.
    Any help much appreciated
    Tom

    Hi Tom,
    You forgot to "mention" your version.
    I'm not sure, but I believe [SKIP LOCKED|http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#SQLRF01702] is safe to use. At least in 11.1. (I have used in both 9i and 10g where it was unsupported/undocumented)
    There is of course always the boring way: A single thread.
    Regards
    Peter

  • Best Practice for Mass Deleting Transactions

    Hi Gurus
    Can you please guide on this - We need to mass delete Leads from the system. I can use Crm_Order_Delete FM. But want to know if there are any best practices to follow, or anything else that i should consider before deleting these transactions from the system.
    We have our archiving policy under discussion which may take some time, but due to large volume of reduntatn data we have some performance issues. For example when searching for leads and using ACE, the system goes through all the lead data.
    That is the reason we are plannign to delete those old records. My concerns is that using CRM_ORDER_DELETE, would it clear all the tables for those deleted transactions and if there are any best practices to follow.
    Thanks in Advance.
    Regards.
    -MP
    Edited by: Mohanpreet Singh on Apr 15, 2010 5:18 PM

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Mass deletion of IDOC

    Hi,
    I have experienced alomost 7K IDOCs in errors. We need to delete them ASAP. Can you Let me know how to perform the Mass deletion of IDOCs ?
    Thanks in advance,
    JIgar

    Hi,
    Thanks a lot for responding. I had tried "SARA" Transaction and had put in "IDOC" as an ARCHIVING OBJECT. After that when I click on "DELETE"; I do not find any way where I can input the number of IDOCs to be deleted.
    Can you help me with this?
    Meanwhile I found one Program "RC1_IDOC_SET_STATUS" through which we can change the Status of the IDOC from 51 to 68. And we can delete the Workitem using TCode "SWWL".
    Thanks,
    Jigar

  • Best Practices to Mass Delete Leads

    Hi Gurus
    Can you please guide on this - We need to mass delete Leads from the system. I can use Crm_Order_Delete FM. But want to know if there are any best practices to follow, or anything else that i should consider before deleting these transactions from the system.
    We have our archiving policy under discussion which may take some time, but due to large volume of reduntatn data we have some performance issues. For example when searching for leads and using ACE, the system goes through all the lead data.
    That is the reason we are plannign to delete those old records. My concerns is that using CRM_ORDER_DELETE, would it clear all the tables for those deleted transactions and if there are any best practices to follow.
    Thanks in Advance.
    Regards.
    -MP

    Hello,
    as the root is single label you could get only rid of it with migrating to a new forest. Therefore you should built a lab first and test the steps. As tool you could use ADMT.
    http://blogs.msmvps.com/mweber/2010/03/25/migrating-active-directory-to-a-new-forest/
    Also you might rethink your design if an empty root is really needed, there is no technical requirement and cost only additional hardware and licenses.
    Keep in mind that the new forest MUST use different domain/NetBios names otherwise you cannot create the required trust for migration steps.
    You can NOT switch a sub domain to the root and vice versa.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • To MASS Delete Physical inventory Docs

    Hi,
         Is there any Transaction code or a way to mass delete the physical inventory documents, as MI02  allow for single one only.
    Thanks&Regards

    Hi,
    I see no other way except LSMW or SHDB for this
    For LSMW the process is easy.Before that if possible read regarding LSMW.For this in T Code LSMW give the name of the Project,SubProject & Object (Any text description) and than execute.You will get a minimum of 14 steps to perform.
    These are the steps.
    1 .Maintain Object Attributes (Select Batch Input Recording and give the T Code as MI02 and taking one PI Document record the transaction.Here enter the PI Document Number & Fiscal Year)
    2. Maintain Source Structures
    3 .Maintain Source Fields(the field IBLNR & GJAHR to be mantained)
    4 .Maintain Structure Relations
    5 .Maintain Field Mapping and Conversion Rules(Here also the two fields IBLNR & GJAHR to be assigned)
    6 .Maintain Fixed Values, Translations, User-Defined Routines
    7. Specify Files(Here the file should be arranged in sequence of PI Document numbers than space Fiscal year and saved as a text file)
    8 .Assign Files
    9 .Read Data
    10 .Display Read Data
    11 .Convert Data
    12 .Display Converted Data
    13 .Create Batch Input Session
    14 .Run Batch Input Session
    After going all the steps the PI documents arranged in the text file will be imported and deleted one by one.
    Regards,
    Baskar

Maybe you are looking for

  • Error Message "Shuffle cannot be read from or written to"

    Anyone able to provide a quick solution to this problem or is my shuffle broke or is it the iTunes? I have uninstalled and installed the programs and updates and it still doesn't work.....I get the same message... It'll be on eBay soon if its this mu

  • How to create unique constraint on a col which has duplicate values

    Hi all, how can i create a unique constraint on a field which have duplicate vaules with no validate clause. My table name is "ACCT" Regards Message was edited by: 53637

  • Camera Raw not seeing changes made by DPP

    I am not sure whether this is a procedure problem or capability. When I edit a (canon 50D) CR2 file in Canon DPP ver 3.6.1.0 and save it as a CR2 file, then open the same CR2 file in camera raw ver 5.5 it does not see any changes made by DPP  it open

  • Idea to improve graphs in illustrator

    Here are some of my thoughts from a web designer/developer working for a financial institution. it should be easier to use illustrator to create dynamic data driven graphs for use in InDesign. I wish I could point an Illustrator file to an XML or JSO

  • Bluetooth Compatibility Apps/Games

    hi guys. i was wondering if there are any applications out there for the iphone (preferrably free) that i can download and play that has bluetooth compatibility. i want to be able to play games together with a person who also has the iphone. thanks.