Deleting large amounts of email easily

I subscribe to large email lists and have as many as 80,000 email in a mailbox. When I want to do some housekeeping and try to select over 100 or so messages, email stops and I have to force quit. It is very time consuming to select 20 at a time. Is there another way to select a large number of messages and delete them.

Another problem with delete is that it generates a vast amount of redo log (and archived logs) information . The better way to get rid of the unneeded data would be to use TRUNCATE command:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_107a.htm#2067573
The problem with truncate that it removes all the data from the table. In order to save some data from the table you can do next thing:
1. create another_table as select * from <main_table> where <data you want to keep clause>
2. save the indexes, constraints, trigger definitions, grants from the main_table
3. drop the main table
4. rename <stage_table> to <main_table>.
5. recreate indexes, constraints and triggers.
Another method is to use partitioning to partition the data based on the key (you've mentioned "historical" - the key could be some date column). Then you can drop the historical data partitions when you need it.
As far as your question about recalculating the statistics - it will not release the storage allocated for index. You'll need to execute ALTER INDEX <index_name> REBUILD :
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_18a.htm
Mike

Similar Messages

  • How do i delete large amount of emails with the iPad mini

    how do i delete large amounts of emails using the ipad mini

    To delete multiple emails touch Edit, select all the emails and then touch Trash.
    There is no way to delete all emails from the Inbox. One can delete all emails from Trash.

  • Deleting large amount of emails locks up Mail?

    I have a local mailbox ("On My Mac") that has about 50000 messages, and I want to delete about half of them. Deleting messages is always very slow (tbh, doing anything in Mail is very slow), but when I try to delete more than 5000 messages at once, Mail simply locks up on me.
    I thought that it was just busy and would eventually come back, but I left it going overnight and came back to see it still locked up. So I force-quit and restarted it, only to find that none of the messages had been deleted or even moved to the trash. I guess deleting messages is an atomic process.
    So my question is, how can I delete a large amount of emails without locking up Mail and without manually sitting there deleting one, waiting 5 seconds for the app to start responding again, and delete another, 25000 times?

    I'm not surprised that dealing with so many messages chokes mail up.
    You can try deleting messages in chunks about 1000 at a time.
    also, you might want to try the following apple script.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Mail"
    set mlist to selection
    repeat with msg in mlist
    delete msg
    end repeat
    end tell</pre>
    Paste the script into Script Editor, select the messages you wish to delete in Mail and press "Run" in script editor. the script works by moving messages one at a time so I hope it shouldn't choke Mail up. However, it will take a long time to run.

  • What is the best practice of deleting large amount of records?

    hi,
    I need your suggestions on best practice of deleting large amount of records of SQL Azure regularly.
    Scenario:
    I have a SQL Azure database (P1) to which I insert data every day, to prevent the database size grow too fast, I need a way to  remove all the records which is older than 3 days every day.
    For on-premise SQL server, I can use SQL Server Agent/job, but, since SQL Azure does not support SQL Job yet, I have to use a Web job which scheduled to run every day to delete all old records.
    To prevent the table locking when deleting too large amount of records, in my automation or web job code, I limit the amount of deleted records to
    5000 and batch delete count to 1000 each time when calling the deleting records stored procedure:
    1. Get total amount of old records (older then 3 days)
    2. Get the total iterations: iteration = (total count/5000)
    3. Call SP in a loop:
    for(int i=0;i<iterations;i++)
       Exec PurgeRecords @BatchCount=1000, @MaxCount=5000
    And the stored procedure is something like this:
     BEGIN
      INSERT INTO @table
      SELECT TOP (@MaxCount) [RecordId] FROM [MyTable] WHERE [CreateTime] < DATEADD(DAY, -3, GETDATE())
     END
     DECLARE @RowsDeleted INTEGER
     SET @RowsDeleted = 1
     WHILE(@RowsDeleted > 0)
     BEGIN
      WAITFOR DELAY '00:00:01'
      DELETE TOP (@BatchCount) FROM [MyTable] WHERE [RecordId] IN (SELECT [RecordId] FROM @table)
      SET @RowsDeleted = @@ROWCOUNT
     END
    It basically works, but the performance is not good. One example is, it took around 11 hours to delete around 1.7 million records, really too long time...
    Following is the web job log for deleting around 1.7 million records:
    [01/12/2015 16:06:19 > 2f578e: INFO] Start getting the total counts which is older than 3 days
    [01/12/2015 16:06:25 > 2f578e: INFO] End getting the total counts to be deleted, total count:
    1721586
    [01/12/2015 16:06:25 > 2f578e: INFO] Max delete count per iteration: 5000, Batch delete count
    1000, Total iterations: 345
    [01/12/2015 16:06:25 > 2f578e: INFO] Start deleting in iteration 1
    [01/12/2015 16:09:50 > 2f578e: INFO] Successfully finished deleting in iteration 1. Elapsed time:
    00:03:25.2410404
    [01/12/2015 16:09:50 > 2f578e: INFO] Start deleting in iteration 2
    [01/12/2015 16:13:07 > 2f578e: INFO] Successfully finished deleting in iteration 2. Elapsed time:
    00:03:16.5033831
    [01/12/2015 16:13:07 > 2f578e: INFO] Start deleting in iteration 3
    [01/12/2015 16:16:41 > 2f578e: INFO] Successfully finished deleting in iteration 3. Elapsed time:
    00:03:336439434
    Per the log, SQL azure takes more than 3 mins to delete 5000 records in each iteration, and the total time is around
    11 hours.
    Any suggestion to improve the deleting records performance?

    This is one approach:
    Assume:
    1. There is an index on 'createtime'
    2. Peak time insert (avgN) is N times more than average (avg). e.g. supposed if average per hour is 10,000 and peak time per hour is 5 times more, that gives 50,000. This doesn't have to be precise.
    3. Desirable maximum record to be deleted per batch is 5,000, don't have to be exact.
    Steps:
    1. Find count of records more than 3 days old (TotalN), say 1,000,000.
    2. Divide TotalN (1,000,000) with 5,000 gives the number of deleted batches (200) if insert is very even. But since it is not even and maximum inserts can be 5 times more per period, set number of deleted batches should be 200 * 5 = 1,000.
    3. Divide 3 days (4,320 minutes) with 1,000 gives 4.32 minutes.
    4. Create a delete statement and a loop that deletes record with creation day < today - (3 days ago - 3.32 * I minutes). (I is the number of iterations from 1 to 1,000)
    In this way the number of records deleted in each batch is not even and not known but should mostly within 5,000 and even you run a lot more batches but each batch will be very fast.
    Frank

  • How do I delete large amounts of photos from my ipad?

    a

    Are you using iPhoto on your iPad? Then deleting photos will depend on the album they are in and how they have been added to the iPad.
    See this document for IOS 6 and earlier:   iPhoto for iOS (iPad): Delete photos from iPhoto
    If you also have a Mac, you can delete quickly large amounts of photos from your camera roll by connecting your iPad to your computer using USB and importing the photos into Image Capture, iPhoto, or Aperture. Then set the option to delete the photos after importing.
    Photos you synced to your iPad can only be deleted by syncing again.
    If you are using IOS 7 you can delete larger amounts of photos from your Camera Roll in the "Moments" view:
    n the Photos.app you can select all photos in a "Moment" at once, by pressing "Select" to the right of the "Moment" name. Then press the Trash icon.
    For example:
    Regrads
    Léonie

  • Deleting large amounts of data

    All,
    I have several tables that have about 1 million plus rows of historical data that is no longer needed and I am considering deleting the data. I have heard that deleting the data will actually slow down performance as it will mess up the indexing, is this true? What if I recalculate statistics after deleting the data? In general, I am looking for advice what is best practices for deleting large amounts of data from tables.
    For everyones reference I am running Oracle 9.2.0.1.0 on Solaris 9. Thanks in advance for the advice.
    Thanks in advance!
    Ron

    Another problem with delete is that it generates a vast amount of redo log (and archived logs) information . The better way to get rid of the unneeded data would be to use TRUNCATE command:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_107a.htm#2067573
    The problem with truncate that it removes all the data from the table. In order to save some data from the table you can do next thing:
    1. create another_table as select * from &lt;main_table&gt; where &lt;data you want to keep clause&gt;
    2. save the indexes, constraints, trigger definitions, grants from the main_table
    3. drop the main table
    4. rename &lt;stage_table&gt; to &lt;main_table&gt;.
    5. recreate indexes, constraints and triggers.
    Another method is to use partitioning to partition the data based on the key (you've mentioned "historical" - the key could be some date column). Then you can drop the historical data partitions when you need it.
    As far as your question about recalculating the statistics - it will not release the storage allocated for index. You'll need to execute ALTER INDEX &lt;index_name&gt; REBUILD :
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_18a.htm
    Mike

  • Is there a way to delete large numbers of emails all at once?

    I receive large numbers of emails because of the discussion lists I'm on, but sometimes I need to delete
    most of them for lack of time.  There can be over 500 in a couple of days.  I'd like to be able to do one simple
    thing that allows me to delete all of this old mail at a time.  Is there such a way?
    Scotty

    If your email account supports it, you can tap the Trash Icon, Tap Edit and the Delete option may let you delete all. I have a Comcast mail account that allows me to do this. I also have two AOL accounts that do not support it.
    Try your mail account and see if the Delete All option comes up at the bottom of the window. Account
    Name>Trash>Edit and look in the lower left corner of the window.

  • How do I delete large number of email messages?

    I get a large number of emails. Is there a way to select them on my iPod Touch 32g in groups rather than one at a time when I delete many messages?

    Did you ever find a solution to this?
    I, too, would like to DELETE lots of emails at the same time, even ALL of my old emails, without having to use EDIT, then touching each email one at a time, then selecting DELETE. Painfully slow if you have 200+ emails ... this should take 5 seconds, not 10 minutes.

  • TS3899 How do I delete large quantities of email from my ipad?

    What is the best way to delete more than one email at a time?

    You can delete as many emails at a time as you can or choose to select, but there is no select all, if that is what you are looking for (except in the trash folder).

  • PI 7.1 IMAP email Adapter Error reading large amounts of emails

    Hi,
    are there any known problems with the email-Adapter (Sender), reading IMAP MS Exchange Server?
    We have an email adapter reading the MS Exchange Server Mail Account once per Minute and in the mail account are about 4.000 unread email  (1KB each) .
    After 2000 emails, the adapter stops working and throws only exceptions.
    Any idea?
    Thanks
    hs

    Hi Holger,
    i made a few tests at that time, and there was no specific scenario which re-produced this error.
    In some tests i was able to process more than 3000 emails before the error occured, next time only 2000.
    And this only occured when the inbox had a huge amount of emails. if i moved, lets say 1000 emails to a temporary folder,
    processed 1000 and then moved the 1000 back to the inbox, there was no problem. Now i'm polling every minute and i'm
    not receiving 2000 emails in a minute, so i'm not having this issue anymore. it only happend when we stopped the
    sender channel for a while and a lot of emails were queuing up in the inbox.  I don't think that there are any MS Exchange settings that need to be changed and when we spoke to Support that time, they refered to the Note i mentioned earlier.
    Maybe there is still a problem in the mail adapter itself..
    regards,
    Daniel

  • How to delete massive amounts of email on iPhone

    Hi. I have over 1500 emails in an earthlink.net email account on an iPhone running iOS 8.1 and want to mass-delete all but the last 3 months — say 120 emails. Is there a way to do this other than one-by-one manually?

    But I need to keep them on my computer. Or, are you saying that, once they've been downloaded to the Powerbook G4 and iPhone 4, if I delete them on webmail, they'll disappear from my iPhone?
    I think my experience has been that, if I delete my road runner webmail emails, it has no effect on e mail already downloaded to my MPB or iPhone 5s.
    I read a nifty-sounding 'trick' for deleting piles of email on an iPhone, but the tipper said not to try it on massive amounts or it would freeze up the iPhone. You check the top email (which activates the 'Move' button so it becomes clickable). Then holding the Move button, unclick the top email and wait, holding down 'Move' (while, seemingly, nothing's happening). Once all the email has been moved, you are presented with a screen with the option to move the moved mail to trash. I'll attach a screenshot of that screen, showing what happened just now to all the (16) emails presently on this iPhone 5s...

  • Deleting large batches of email on my ipad

    Hi, I don't use my iPad as much as my iPhone so at times the in box will get pretty large. When I do use it though I want to see all my email for at least that day so I have my mail settings set to see 50msgs. Anyway, my mail box sometimes gets pretty big of just stuff I've already read on my phone so I want to do a mass delete. So far the Only way I've found to delete is the edit button and that takes forever with hundreds of msgs.. Is there a mass delete feature that I am just missing?

    Jandhf wrote:
    On the email page in the upper right corner there is a blue EDIT button. Click that then click Delete in the bottom left - select all.
    Try it - it's easy.
    At first I thought you'd discovered an undocumented feature, where a 'press & hold' on the Delete button would pop up a "Delete All" option.
    Sadly, no. The only place you get that option is if you have a Trash mailbox selected, as had already been pointed out in this thread.

  • How can I delete large amounts of mail at once

    On my iPad, how can I delete all of my mail at once?

    How to Delete Email on the iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Delete-Email-On-The-Ipad.htm
    How to Mass Delete Emails from iPhone and iPad Inbox (with video)
    http://suiteminute.com/how-to-mass-delete-emails-from-iphone-and-ipad-inbox/
    How to delete ALL mail messages from iPhone/iPad in one step
    http://www.conferencesthatwork.com/index.php/technology/2014/01/how-to-delete-al l-mail-messages-from-iphoneipad-in-one-step/
     Cheers, Tom

  • How to delete large number of email notifications from facebook

    I have been receiving email notifications from facebook for years. I only know how to delete them one at a time. I now want to clean up my computer and do not know how to delete these unneeded emails. they number in the thousands.

    Holding Shift while you click selected everything between two mouse clicks.
    Using Ctrl you can fine turn what is selected by clicking on thing to unselect them
    Got the idea?

  • Deleting Large amounts of songs purchased

    Is it possible to easily display what account purchased the iTunes song? I have several accounts that have authorized my computer to play music so I have songs from different iTunes accounts. One account in particular is no longer authorized to play, so I would like to delete all the songs purchased with that account. Is there a way to group all of the songs together to delete them quickly?
    I do NOT want to go through "Get Info" and then click through all the songs in my iTunes library just to find the ones to delete.
    Message was edited by: KJESPOKO

    Try this AppleScript (courtesy of the incredibly useful Doug's AppleScripts for iTunes):
    http://dougscripts.com/itunes/scripts/ss.php?sp=trackdownpurchases

Maybe you are looking for

  • Exporting reports in 9.3.0

    Hi, I succesfully migrated aplication form 9.3.0 to 11.1.2.1 and now I need to do the same with reports. I decided to simply export reports from one enviroment and export them in another. In workspace i select export, chose folder and selected folder

  • PeriodsToDate and single Time dimension Attributes

    Hi folks, I just want to kindly confirm with you, if the PeriodsToDate function works only with user hierarchy? That is because I am building some YTD calculation and I have two user hierarchies in the Time dimension, let´s say Markenting Calendar an

  • Mac Mail:  Space limitations for work - Reminders / Notes

    Hey there Mac Folks, I'm using Mac Mail to access my work mail but we have significant space limitations on us. I've cleaned up a lot of my mailboxes into my work account but I see all of emails from my current mailboxes listed under Reminders ==> No

  • How to fix a problem blinking application? but finder is'nt crashing

    just like me use applications suddenly blinking in and out every application ,example : me click photoshop icon after that blinking in and out and i try click safari, it blinking of gray and me clik 2 x again .. after this i restart 3 x my imac just

  • What is pricing in MM..?

    Dear all Can anybody explain me about pricing in MM, My basic doubt is in std SAP pricing is already is there, like basic price,discount, surcharge,freight..etc Please explain about terms with example with how account posting will happen for all abov