Skip to main content
Question

What is difference purge() and DO_TM_TASK('mergeout') ?

  • December 2, 2020
  • 1 reply
  • 4 views

HyeontaeJu
Forum|alt.badge.img+2

What is difference purge() and DO_TM_TASK('mergeout') ?
Is the purge mergeout's sub task??

1 reply

mosheg
Forum|alt.badge.img+2
  • Participating Frequently
  • December 4, 2020

PURGE permanently removes delete vectors from ROS storage containers so disk space can be reused.
SELECT DO_TM_TASK('mergeout'); runs a Tuple Mover operation to merge ROS containers.

Purging deleted records in a storage container requires a rewrite of the storage container. Purging deleted records more often than is necessary results in a significant increase in I/O. Because the I/O can increase significantly, Vertica purges deleted records only when storage containers are rewritten by node-based operations, such as:

  • Recovery
  • Reorganize
  • Rebalance
  • Refresh
  • Tuple Mover mergeout

The mergeout operation merges ROS containers that qualify for mergeout based on a strata algorithm for active partitions and for tables without partitions. During mergeout, the Tuple Mover purges any records from qualifying ROS containers deleted prior to the AHM epoch.
When a new partition is created, the current active partition becomes inactive. ROS containers of the most recent inactive partition are merged into a single ROS container. Records deleted prior the AHM epoch are purged during this process.
See: https://www.vertica.com/kb/Deletes-in-Vertica-The-FAQs/Content/FAQs/Deletes-in-Vertica-The-FAQs.htm