• Sean Lange (5/25/2016)


    gjuarez (5/24/2016)


    The table has 67404675, i need to keep 180 days, I calculated about 10,000000 for a year.

    So you are only going to keep 180 rows out of 67,404,675 rows? If that is the case you shouldn't bother trying to delete anything. Just copy the 180 rows into another table. Then drop the existing massive table. Then rename the newly created table to the original table name.

    Actually, I think it may be about 5,000,000 rows for 180 days. Still, should look at a maintenance window so you can copy out the data you want to retain into another table, rename the original table to an archive name, rename the new table to the original table name. At that point you only need to archive a single day every day which will be much more manageable.