Removal OptionsIn Vertica, you have a couple different options for removing data from your database. You can:
- Perform a DELETE and wait for the Tuple Mover(TM) to perform a MERGEOUT
- Manually purge the data
- Drop partitions
- Truncate information from a table
Epoch ModelIf you are not familiar with the Vertica epoch model, see Understanding Vertica Epochs.
The most important thing to remember is that when you perform a DELETE, you are not actually moving data off the system. The data files are just marked for deletion. For more information about deletes in Vertica, see the following articles:
- Best Practices for Deleting Data
- Deletes in Vertica: The FAQs
- Replay Deletes in Vertica
- Tuple Mover Best Practices
Manually Purging Data
While the TM regularly purges data, you can choose to perform a purge manually as well. For more information, see Manually Purging Data in the Vertica documentation.
Using the DROP_PARTITION function forces Vertiica to partition projections (if the partition does not already exist) and then drops the specified partition. For more information, see Dropping Partitions in the Vertica documentation.
Sometimes you want to delete data from a table but keep the rest of the table properties intact. In these situations, you can use the TRUNCATE TABLE function. For more information, see Truncating Tables in the Vertica documentation.