<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Mergeout</title>
    <link>/en/admin/managing-db/tuple-mover/mergeout/</link>
    <description>Recent content in Mergeout on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/managing-db/tuple-mover/mergeout/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Mergeout request types and precedence</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/mergeout-request-types-and-precedence/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/mergeout-request-types-and-precedence/</guid>
      <description>
        
        
        &lt;p&gt;The Tuple Mover constantly monitors all activity that generates new ROS containers. As it does so, it creates mergeout requests and queues them according to type. These types include, in descending order of precedence:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;RECOMPUTE_LIMITS: Sets criteria used by the Tuple Mover to determine when to queue new merge requests for a projection. This request type is queued in two cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When a projection is created.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When an existing projection changes—for example, a column is added or dropped, or a configuration parameter changes that affects ROS storage for that projection, such as &lt;a href=&#34;../../../../../en/sql-reference/config-parameters/tuple-mover-parameters/#ActivePa&#34;&gt;ActivePartitionCount&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MERGEOUT: Consolidate new containers. These containers typically contain data from recent load activity or table partitioning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;DVMERGEOUT: Consolidate data marked for deletion, or &lt;em&gt;delete vectors&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PURGE: Purge aged-out delete vectors from containers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Tuple Mover also monitors how frequently containers are created for each projection, to determine which projections might be at risk from ROS pushback. Intense DML activity on projections typically causes a high rate of container creation. The Tuple Mover monitors MERGEOUT and DVMERGEOUT requests and, within each set, prioritizes them according to their level of projection activity. Mergeout requests for projections with the highest rate of container creation get priority for immediate execution.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The Tuple Mover often postpones mergeout for projections with a low level of load activity. Until a projection meets the internal threshold for queuing mergeout requests, mergeout from those projections is liable to remain on hold.

&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Scheduled mergeout</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/scheduled-mergeout/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/scheduled-mergeout/</guid>
      <description>
        
        
        &lt;p&gt;At regular intervals set by configuration parameter 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/config-parameters/tuple-mover-parameters/#MergeOut&#34;&gt;MergeOutInterval&lt;/a&gt;&lt;/code&gt;, the Tuple Mover checks the mergeout request queue for pending requests:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the queue contains mergeout requests, the Tuple Mover does nothing and goes back to sleep.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the queue is empty, the Tuple Mover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Processes pending storage location move requests.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Checks for new unqueued purge requests and adds them to the queue.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It then goes back to sleep.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By default, this parameter is set to 600 (seconds).

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Scheduled mergeout is independent of the Tuple Mover service that continuously monitors mergeout requests and executes them as needed.
&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: User-invoked mergeout</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/user-invoked-mergeout/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/user-invoked-mergeout/</guid>
      <description>
        
        
        &lt;p&gt;You can invoke mergeout at any time on one or more projections, by calling Vertica meta-function 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/storage-functions/do-tm-task/#&#34;&gt;DO_TM_TASK&lt;/a&gt;&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DO_TM_TASK(&amp;#39;mergeout&amp;#39;[, &amp;#39;[[&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;schema&lt;/span&gt;.]{&lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;projection&lt;/span&gt;} ]&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The function scans the database catalog within the specified scope to identify outstanding mergeout tasks. If no table or projection is specified, &lt;code&gt;DO_TM_TASK&lt;/code&gt; scans the entire catalog. Unlike the continuous TM service, which runs in the TM resource pool, &lt;code&gt;DO_TM_TASK&lt;/code&gt; runs in the GENERAL pool. If &lt;code&gt;DO_TM_TASK&lt;/code&gt; executes mergeout tasks that are pending in the merge request queue, the TM service removes these tasks from the queue with no action taken.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Partition mergeout</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/partition-mergeout/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/partition-mergeout/</guid>
      <description>
        
        
        &lt;p&gt;Vertica keeps data from different table &lt;a href=&#34;../../../../../en/admin/partitioning-tables/&#34;&gt;partitions&lt;/a&gt; or &lt;a href=&#34;../../../../../en/admin/partitioning-tables/defining-partitions/partition-grouping/&#34;&gt;partition groups&lt;/a&gt; separate on disk. The Tuple Mover adheres to this separation policy when it consolidates ROS containers. When a partition is first created, it typically has frequent data loads and requires regular activity from the Tuple Mover. As a partition ages, it commonly transitions to a mostly read-only workload and requires much less activity.&lt;/p&gt;
&lt;p&gt;The Tuple Mover has two different policies for managing these different partition workloads:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Active partition&lt;/em&gt; is the partition that was most recently created. The Tuple Mover uses a &lt;a href=&#34;../../../../../en/admin/managing-db/tuple-mover/mergeout/mergeout-strata-algorithm/&#34;&gt;strata-based algorithm&lt;/a&gt; that seeks to minimize the number of times individual tuples undergo mergeout. A table&#39;s &lt;a href=&#34;../../../../../en/admin/partitioning-tables/active-and-inactive-partitions/&#34;&gt;active partition count&lt;/a&gt; identifies how many partitions are active for that table.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Inactive partitions&lt;/em&gt; are those that were not most recently created. The Tuple Mover consolidates ROS containers to a minimal set while avoiding merging containers whose size exceeds &lt;code&gt;MaxMrgOutROSSizeMB&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If you &lt;a href=&#34;../../../../../en/admin/managing-db/tuple-mover/mergeout/user-invoked-mergeout/&#34;&gt;invoke mergeout&lt;/a&gt; with the Vertica meta-function
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/storage-functions/do-tm-task/#&#34;&gt;DO_TM_TASK&lt;/a&gt;&lt;/code&gt;, all partitions are consolidated into the smallest possible number of containers, including active partitions.

&lt;/div&gt;
&lt;p&gt;For details on how the Tuple Mover identifies active partitions, see &lt;a href=&#34;../../../../../en/admin/partitioning-tables/active-and-inactive-partitions/#&#34;&gt;Active and inactive partitions&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;partition-mergeout-thread-allocation&#34;&gt;Partition mergeout thread allocation&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;../../../../../en/admin/managing-db/managing-workloads/resource-pool-architecture/built-resource-pools-config/&#34;&gt;TM resource pool&lt;/a&gt; sets the number of threads that are available for mergeout with its MAXCONCURRENCY parameter. By default , this parameter is set to 7. Vertica allocates half the threads to active partitions, and the remaining half to active and inactive partitions. If MAXCONCURRENCY is set to an uneven integer, Vertica rounds up to favor active partitions.&lt;/p&gt;
&lt;p&gt;For example, if MAXCONCURRENCY is set to 7, then Vertica allocates four threads exclusively to active partitions, and allocates the remaining three threads to active and inactive partitions as needed. If additional threads are required to avoid ROS pushback, increase MAXCONCURRENCY with &lt;a href=&#34;../../../../../en/sql-reference/statements/alter-statements/alter-resource-pool/#&#34;&gt;ALTER RESOURCE POOL&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Deletion marker mergeout</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/deletion-marker-mergeout/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/deletion-marker-mergeout/</guid>
      <description>
        
        
        &lt;p&gt;When you delete data from the database, Vertica does not remove it. Instead, it marks the data as deleted. Using many 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/statements/delete/#&#34;&gt;DELETE&lt;/a&gt;&lt;/code&gt; statements to mark a small number of rows relative to the size of a table can result in creating many small containers—&lt;em&gt;delete vectors&lt;/em&gt;—to hold data marked for deletion. Each delete vector container consumes resources, so a large number of such containers can adversely impact performance, especially during recovery.&lt;/p&gt;
&lt;p&gt;After the Tuple Mover performs a mergeout, it looks for deletion marker containers that hold few entries. If such containers exist, the Tuple Mover merges them together into a single, larger container. This process helps lower the overhead of tracking deleted data by freeing resources used by multiple, individual containers. The Tuple Mover does not purge or otherwise affect the deleted data, but consolidates delete vectors for greater efficiency.

&lt;div class=&#34;alert admonition tip&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Tip&lt;/h4&gt;

Query system table
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/delete-vectors/#&#34;&gt;DELETE_VECTORS&lt;/a&gt;&lt;/code&gt; to view the number and size of containers that store deleted data.

&lt;/div&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Disabling mergeout on specific tables</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/disabling-mergeout-on-specific-tables/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/disabling-mergeout-on-specific-tables/</guid>
      <description>
        
        
        &lt;p&gt;By default, &lt;a href=&#34;../../../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout&lt;/a&gt; is enabled for all tables and their projections. You can disable mergeout on a table with &lt;a href=&#34;../../../../../en/sql-reference/statements/alter-statements/alter-table/#&#34;&gt;ALTER TABLE&lt;/a&gt;. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER TABLE public.store_orders_temp SET MERGEOUT 0;
ALTER TABLE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In general, it is useful to disable mergeout on tables that you create to serve a temporary purpose—for example, staging tables that are used to &lt;a href=&#34;../../../../../en/admin/partitioning-tables/managing-partitions/archiving-partitions/&#34;&gt;archive old partition data&lt;/a&gt;, or &lt;a href=&#34;../../../../../en/admin/partitioning-tables/managing-partitions/swapping-partitions/&#34;&gt;swap partitions&lt;/a&gt; between tables—which are deleted soon after the task is complete. By doing so, you avoid the mergeout-related overhead that the table would otherwise incur.&lt;/p&gt;
&lt;p&gt;You can query system table &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/tables/#&#34;&gt;TABLES&lt;/a&gt; to identify tables that have mergeout disabled:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT table_schema, table_name, is_mergeout_enabled FROM v_catalog.tables WHERE is_mergeout_enabled= 0;
 table_schema |    table_name     | is_mergeout_enabled
--------------+-------------------+---------------------
 public       | store_orders_temp | f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Admin: Purging ROS containers</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/purging-ros-containers/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/purging-ros-containers/</guid>
      <description>
        
        
        &lt;p&gt;Vertica periodically checks ROS storage containers to determine whether delete vectors are eligible for purge, as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Counts the number of aged-out delete vectors in each container—that is, delete vectors that are equal to or earlier than the ancient history mark (AHM) epoch.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Calculates the percentage of aged-out delete vectors relative to the total number of records in the same ROS container.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If this percentage exceeds the threshold set by configuration parameter &lt;a href=&#34;../../../../../en/sql-reference/config-parameters/tuple-mover-parameters/&#34;&gt;PurgeMergeoutPercent&lt;/a&gt; (by default, 20 percent), Vertica automatically performs a mergeout on the ROS container that permanently removes all aged-out delete vectors. Vertica uses the TM resource pool&#39;s &lt;a href=&#34;../../../../../en/admin/managing-db/managing-workloads/resource-pool-architecture/built-resource-pools-config/#MAXCONCURRENCY&#34;&gt;MAXCONCURRENCY&lt;/a&gt; setting to determine how many threads are available for the mergeout operation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can also manually purge all aged-out delete vectors from ROS containers with two Vertica meta-functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/storage-functions/do-tm-task/&#34;&gt;DO_TM_TASK(&#39;mergeout&#39;)&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/db-functions/purge/#&#34;&gt;PURGE&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both functions remove all aged-out delete vectors from ROS containers, regardless of how many are in a given container.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Mergeout strata algorithm</title>
      <link>/en/admin/managing-db/tuple-mover/mergeout/mergeout-strata-algorithm/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-db/tuple-mover/mergeout/mergeout-strata-algorithm/</guid>
      <description>
        
        
        &lt;p&gt;The mergeout operation uses a strata-based algorithm to verify that each tuple is subjected to a mergeout operation a small, constant number of times, despite the process used to load the data. The mergeout operation uses this algorithm to choose which ROS containers to merge for non-partitioned tables and for active partitions in partitioned tables.&lt;/p&gt;
&lt;p&gt;Vertica builds strata for each active partition and for projections anchored to non-partitioned tables. The number of strata, the size of each stratum, and the maximum number of ROS containers in a stratum is computed based on disk size, memory, and the number of columns in a projection.&lt;/p&gt;
&lt;p&gt;Merging small ROS containers before merging larger ones provides the maximum benefit during the mergeout process. The algorithm begins at stratum 0 and moves upward. It checks to see if the number of ROS containers in a stratum has reached a value equal to or greater than the maximum ROS containers allowed per stratum. The default value is 32. If the algorithm finds that a stratum is full, it marks the projections and the stratum as eligible for mergeout.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
