<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Epochs</title>
    <link>/en/admin/failure-recovery/epochs/</link>
    <description>Recent content in Epochs on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/failure-recovery/epochs/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Epoch life cycle</title>
      <link>/en/admin/failure-recovery/epochs/epoch-life-cycle/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/failure-recovery/epochs/epoch-life-cycle/</guid>
      <description>
        
        
        &lt;p&gt;The epoch life cycle consists of a sequence of milestones that enable you to perform a variety of operations and manage the state of your database.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/epochs-stages.svg&#34; alt=&#34;&#34;&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;

Depending on your configuration, a single epoch can represent the latest epoch, last good epoch, checkpoint epoch, and ancient history mark.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;OpenText™ Analytics Database provides &lt;a href=&#34;../../../../en/sql-reference/config-parameters/epoch-management-parameters/&#34;&gt;epoch management parameters&lt;/a&gt; and &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/&#34;&gt;functions&lt;/a&gt; so that you can retrieve and adjust epoch values. Additionally, see &lt;a href=&#34;../../../../en/admin/failure-recovery/epochs/configuring-epochs/#&#34;&gt;Configuring epochs&lt;/a&gt; for recommendations on how to set epochs for specific use cases.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Current&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;current-epoch-ce&#34;&gt;Current epoch (CE)&lt;/h2&gt;
&lt;p&gt;The open epoch that contains all uncommitted changes that you are presently writing to the database. The current epoch is stored in the &lt;code&gt;SYSTEM&lt;/code&gt; system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CURRENT_EPOCH FROM SYSTEM;
 CURRENT_EPOCH
---------------
         71
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example demonstrates how the current epoch advances when you commit data:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Query the &lt;code&gt;SYSTEM&lt;/code&gt; systems table to return the current epoch:&lt;br /&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CURRENT_EPOCH FROM SYSTEM;
 CURRENT_EPOCH
---------------
         71
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The current epoch is open, which means it is the epoch that you are presently writing data to.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert a row into the &lt;code&gt;orders&lt;/code&gt; table:&lt;br /&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT INTO orders VALUES (&amp;#39;123456789&amp;#39;, 323426, &amp;#39;custacct@example.com&amp;#39;);
 OUTPUT
--------
      1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Each row of data has an implicit epoch column that stores that row&#39;s commit epoch. The row that you just inserted into the table was not committed, so the &lt;code&gt;epoch&lt;/code&gt; column is blank:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT epoch, orderkey, custkey, email_addrs FROM orders;
 epoch | orderkey  | custkey |     email_addrs
-------+-----------+---------+----------------------
       | 123456789 |  323426 | custacct@example.com
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Commit the data, then query the table again. The committed data is associated with epoch &lt;code&gt;71&lt;/code&gt;, the current epoch that was previously returned from the &lt;code&gt;SYSTEM&lt;/code&gt; systems table:&lt;br /&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; COMMIT;
COMMIT
=&amp;gt; SELECT epoch, orderkey, custkey, email_addrs FROM orders;
 epoch | orderkey  | custkey |     email_addrs
-------+-----------+---------+----------------------
    71 | 123456789 |  323426 | custacct@example.com
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query the &lt;code&gt;SYSTEMS&lt;/code&gt; table again to return the current epoch. The current epoch is 1 integer higher:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CURRENT_EPOCH FROM SYSTEM;
 CURRENT_EPOCH
---------------
         72
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;latest-epoch-le&#34;&gt;Latest epoch (LE)&lt;/h2&gt;
&lt;p&gt;The most recently closed epoch. The current epoch becomes the latest epoch after a commit operation.&lt;/p&gt;
&lt;p&gt;The LE is the most recent epoch stored in the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/epochs/#&#34;&gt;EPOCHS&lt;/a&gt; system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM EPOCHS;
       epoch_close_time        | epoch_number
-------------------------------+--------------
 2020-07-27 14:29:49.687106-04 |           91
 2020-07-28 12:51:53.291795-04 |           &lt;span class=&#34;code-input&#34;&gt;92&lt;/span&gt;
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;checkpoint-epoch-cpe&#34;&gt;Checkpoint epoch (CPE)&lt;/h2&gt;
&lt;p&gt;Valid in Enterprise Mode only. Each node has a checkpoint epoch, which is the most recent epoch in which the data on that node is consistent across all projections. When the database runs optimally, the checkpoint epoch is equal to the LE, which is always one epoch older than the current epoch.&lt;/p&gt;
&lt;p&gt;The checkpoint epoch is used during node failure and recovery. When a single node fails, that node attempts to rebuild data beyond its checkpoint epoch from other nodes. If the failed node cannot recover data using any of those epochs, then the failed node recovers data using the checkpoint epoch.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/projection-checkpoint-epochs/#&#34;&gt;PROJECTION_CHECKPOINT_EPOCHS&lt;/a&gt; to query information about the checkpoint epochs. The following query returns information about the checkpoint epoch on nodes that store the &lt;code&gt;orders&lt;/code&gt; projection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT checkpoint_epoch, node_name, projection_name, is_up_to_date, would_recover, is_behind_ahm
      FROM PROJECTION_CHECKPOINT_EPOCHS WHERE projection_name ILIKE &amp;#39;orders_b%&amp;#39;;
 checkpoint_epoch |    node_name     | projection_name | is_up_to_date | would_recover | is_behind_ahm
------------------+------------------+-----------------+---------------+---------------+---------------
               92 | v_vmart_node0001 | orders_b1       | t             | f             | f
               92 | v_vmart_node0001 | orders_b0       | t             | f             | f
               92 | v_vmart_node0003 | orders_b1       | t             | f             | f
               92 | v_vmart_node0003 | orders_b0       | t             | f             | f
               92 | v_vmart_node0002 | orders_b0       | t             | f             | f
               92 | v_vmart_node0002 | orders_b1       | t             | f             | f
(6 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This query confirms that the database epochs are advancing correctly. The &lt;code&gt;would_recover&lt;/code&gt; column displays an &lt;code&gt;f&lt;/code&gt; when the last good epoch (LGE) is equal to the CPE because the database gives precedence to the LGE for recovery when possible. The &lt;code&gt;is_behind_ahm&lt;/code&gt; column shows whether the checkpoint epoch is behind the AHM. Any data in an epoch that precedes the ancient history mark (AHM) is unrecoverable in case of a database or node failure.&lt;/p&gt;
&lt;h2 id=&#34;last-good-epoch-lge&#34;&gt;Last good epoch (LGE)&lt;/h2&gt;
&lt;p&gt;The minimum checkpoint epoch in which data is consistent across all nodes in the cluster. Each node has an LGE, and the database evaluates the LGE for each node to determine the cluster LGE. The cluster&#39;s LGE is stored in the &lt;code&gt;SYSTEM&lt;/code&gt; system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LAST_GOOD_EPOCH FROM SYSTEM;
 LAST_GOOD_EPOCH
-----------------
              70
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can retrieve the LGE for each node by querying the expected recovery epoch:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT GET_EXPECTED_RECOVERY_EPOCH();
INFO 4544:  Recovery Epoch Computation:
Node Dependencies:
011 - cnt: 21
101 - cnt: 21
110 - cnt: 21
111 - cnt: 9

001 - name: v_vmart_node0001
010 - name: v_vmart_node0002
100 - name: v_vmart_node0003
Nodes certainly in the cluster:
        Node 0(v_vmart_node0001), epoch &lt;span class=&#34;code-input&#34;&gt;70&lt;/span&gt;
        Node 1(v_vmart_node0002), epoch &lt;span class=&#34;code-input&#34;&gt;70&lt;/span&gt;
Filling more nodes to satisfy node dependencies:
Data dependencies fulfilled, remaining nodes LGEs don&amp;#39;t matter:
        Node 2(v_vmart_node0003), epoch &lt;span class=&#34;code-input&#34;&gt;70&lt;/span&gt;
--
 GET_EXPECTED_RECOVERY_EPOCH
-----------------------------
                          70
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Because the LGE is a snapshot of all of the most recent data on the disk, it is used to recover from database failure. Administration Tools uses the LGE to &lt;a href=&#34;../../../../en/admin/using-admin-tools/admin-tools-reference/advanced-menu-options/rolling-back-db-to-last-good-epoch/&#34;&gt;manually reset the database&lt;/a&gt;. If you are &lt;a href=&#34;../../../../en/admin/failure-recovery/&#34;&gt;recovering from database failure&lt;/a&gt; after an unclean shutdown, the database prompts you to accept recovery using the LGE during restart.&lt;/p&gt;
&lt;h2 id=&#34;ancient-history-mark-ahm&#34;&gt;Ancient history mark (AHM)&lt;/h2&gt;
&lt;p&gt;The oldest epoch that contains data that is accessible by &lt;a href=&#34;../../../../en/data-analysis/queries/historical-queries/&#34;&gt;historical queries&lt;/a&gt;. The AHM is stored in the &lt;code&gt;SYSTEM&lt;/code&gt; system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT AHM_EPOCH FROM SYSTEM;
 AHM_EPOCH
-----------
        70
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Epochs that precede the AHM are unavailable for historical queries. The following example returns the AHM, and then returns an error when executing a historical query that precedes the AHM:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT GET_AHM_EPOCH();
 GET_AHM_EPOCH
---------------
            93
(1 row)

=&amp;gt; AT EPOCH 92 SELECT * FROM orders;
ERROR 3183:  Epoch number out of range
HINT:  Epochs prior to [93] do not exist. Epochs [94] and later have not yet closed
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The AHM advances according to your &lt;code&gt;HistoryRetentionTime&lt;/code&gt;, &lt;code&gt;HistoryRetentionEpochs&lt;/code&gt;, and &lt;code&gt;AdvanceAHMInterval&lt;/code&gt; &lt;a href=&#34;../../../../en/sql-reference/config-parameters/epoch-management-parameters/&#34;&gt;parameter settings&lt;/a&gt;. By default, the AHM advances every 180 seconds until it is equal with the LGE. This helps reduce the number of epochs saved to the &lt;a href=&#34;../../../../en/glossary/epoch-map/&#34;&gt;epoch map&lt;/a&gt;, which reduces the catalog size. The AHM cannot advance beyond the LGE.&lt;/p&gt;
&lt;p&gt;The AHM serves as the cutoff epoch for purging data from physical disk. As the AHM advances, the Tuple Mover &lt;a href=&#34;../../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout process&lt;/a&gt; purges any deleted data that belongs to an epoch that precedes the AHM. See &lt;a href=&#34;../../../../en/admin/working-with-native-tables/removing-table-data/purging-deleted-data/#&#34;&gt;Purging deleted data&lt;/a&gt; for details about automated or manual purges.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Managing epochs</title>
      <link>/en/admin/failure-recovery/epochs/managing-epochs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/failure-recovery/epochs/managing-epochs/</guid>
      <description>
        
        
        &lt;p&gt;Epochs are stored in the epoch map, a catalog object that contains a list of closed epochs beginning at ancient history mark (AHM) epoch and ending at the latest epoch (LE). As the epoch map increases in size, the catalog uses more memory. Additionally, the AHM is used to determine what data is purged from disk. It is important to monitor database epochs to verify that they are advancing correctly to optimize database performance.&lt;/p&gt;
&lt;h2 id=&#34;monitoring-epochs&#34;&gt;Monitoring epochs&lt;/h2&gt;
&lt;p&gt;When OpenText™ Analytics Database is running properly using the default settings, the ancient history mark, last good epoch (LGE), and checkpoint epoch (CPE, Enterprise Mode only) are equal to the latest epoch, or 1 less than the current epoch. This maintains control on the size of the epoch map and catalog by making sure that disk space is not used storing data that is eligible for purging. The &lt;code&gt;SYSTEM&lt;/code&gt; system table stores the current epoch, last good epoch, and ancient history mark:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CURRENT_EPOCH, LAST_GOOD_EPOCH, AHM_EPOCH FROM SYSTEM;
 CURRENT_EPOCH | LAST_GOOD_EPOCH | AHM_EPOCH
---------------+-----------------+-----------
            88 |              87 |        87
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;OpenText™ Analytics Database provides &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/get-ahm-epoch/#&#34;&gt;GET_AHM_EPOCH&lt;/a&gt;, &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/get-ahm-time/#&#34;&gt;GET_AHM_TIME&lt;/a&gt;, &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/get-current-epoch/#&#34;&gt;GET_CURRENT_EPOCH&lt;/a&gt;, and &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/get-last-good-epoch/#&#34;&gt;GET_LAST_GOOD_EPOCH&lt;/a&gt; to retrieve these epochs individually.&lt;/p&gt;
&lt;p&gt;In Enterprise Mode, you can query the checkpoint epoch using the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/projection-checkpoint-epochs/#&#34;&gt;PROJECTION_CHECKPOINT_EPOCHS&lt;/a&gt; table to return the checkpoint epoch for each node in your cluster. The following query returns the CPE for any node that stores the &lt;code&gt;orders&lt;/code&gt; projection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT checkpoint_epoch, node_name, projection_name
     FROM PROJECTION_CHECKPOINT_EPOCHS WHERE projection_name ILIKE &amp;#39;orders_b%&amp;#39;;
 checkpoint_epoch |    node_name     | projection_name
------------------+------------------+-----------------
               87 | v_vmart_node0001 | orders_b1
               87 | v_vmart_node0001 | orders_b0
               87 | v_vmart_node0003 | orders_b1
               87 | v_vmart_node0003 | orders_b0
               87 | v_vmart_node0002 | orders_b0
               87 | v_vmart_node0002 | orders_b1
(6 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;troubleshooting-the-ancient-history-mark&#34;&gt;Troubleshooting the ancient history mark&lt;/h2&gt;
&lt;p&gt;A properly functioning AHM is critical in determining how well your database utilizes disk space and executes queries. When you commit a DELETE or UPDATE (a combination of DELETE and INSERT) operation, the data is not deleted from disk immediately. Instead, the database marks the data for deletion so that you can retrieve it with historical queries. Deleted data takes up space on disk and impacts query performance because the database must read the deleted data during non-historical queries.&lt;/p&gt;
&lt;p&gt;Epochs advance as you commit data, and any data that is marked for deletion is automatically purged by the Tuple Mover &lt;a href=&#34;../../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout process&lt;/a&gt; when its epoch advances past the AHM. You can create an automated purge policy or manually purge any deleted data that was committed in an epoch that precedes the AHM. See &lt;a href=&#34;../../../../en/admin/working-with-native-tables/removing-table-data/purging-deleted-data/setting-purge-policy/#&#34;&gt;Setting a purge policy&lt;/a&gt; for additional information.&lt;/p&gt;
&lt;p&gt;By default, the AHM advances every 180 seconds until it is equal to the LGE. Monitor the &lt;code&gt;SYSTEM&lt;/code&gt; system table to ensure that the AHM is advancing according properly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CURRENT_EPOCH, LAST_GOOD_EPOCH, AHM_EPOCH FROM SYSTEM;
 CURRENT_EPOCH | LAST_GOOD_EPOCH | AHM_EPOCH
---------------+-----------------+-----------
            94 |              93 |        86
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you notice that the AHM is not advancing correctly, it might be due to one or more of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Your database contains unrefreshed projections. This occurs when you create a projection for a table that already contains data. See &lt;a href=&#34;../../../../en/admin/projections/refreshing-projections/#&#34;&gt;Refreshing projections&lt;/a&gt; for details on how to refresh projections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A node is DOWN. When a node is DOWN, the AHM cannot advance. See &lt;a href=&#34;../../../../en/admin/failure-recovery/restarting-on-host/#&#34;&gt;Restarting the database on a host&lt;/a&gt; for information on how to resolve this issue.&lt;/p&gt;

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

You can use the &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/make-ahm-now/#&#34;&gt;MAKE_AHM_NOW&lt;/a&gt;, &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/set-ahm-epoch/#&#34;&gt;SET_AHM_EPOCH&lt;/a&gt;, or &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/set-ahm-time/#&#34;&gt;SET_AHM_TIME&lt;/a&gt; epoch management functions to manually set the AHM to a specific epoch. If the selected epoch is later than the DOWN node&#39;s LGE, the node must recover from scratch upon restart.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Confirm that the &lt;code&gt;AHMBackupManagement&lt;/code&gt; epoch parameter is set to &lt;code&gt;0&lt;/code&gt;. If this parameter is set to 1, the AHM does not advance beyond the most recent full backup:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT node_name, parameter_name, current_value FROM CONFIGURATION_PARAMETERS WHERE parameter_name=&amp;#39;AHMBackupManagement&amp;#39;;
 node_name |   parameter_name    | current_value
-----------+---------------------+---------------
 ALL       | AHMBackupManagement | 0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Configuring epochs</title>
      <link>/en/admin/failure-recovery/epochs/configuring-epochs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/failure-recovery/epochs/configuring-epochs/</guid>
      <description>
        
        
        &lt;p&gt;Epoch configuration impacts how your database recovers from failure, handles historical data, and purges data from disk. OpenText™ Analytics Database provides &lt;a href=&#34;../../../../en/sql-reference/config-parameters/epoch-management-parameters/&#34;&gt;epoch management parameters&lt;/a&gt; for system-wide epoch configuration. &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/&#34;&gt;Epoch management functions&lt;/a&gt; enable you to make ad hoc adjustments to epoch values.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Epoch configuration has a significant impact on how your database functions. Make sure that you understand how epochs work before you save any configurations.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;historical-query-and-recovery-precision&#34;&gt;Historical query and recovery precision&lt;/h2&gt;
&lt;p&gt;When you execute a historical query, the database returns an epoch within the amount of time specified by the &lt;a href=&#34;../../../../en/sql-reference/config-parameters/epoch-management-parameters/&#34;&gt;EpochMapInterval&lt;/a&gt; configuration parameter. For example, when you execute a historical query using the 
&lt;code&gt;AT TIME &lt;span class=&#34;code-variable&#34;&gt;time&lt;/span&gt;&lt;/code&gt; epoch clause, the database returns an epoch within the parameter setting. By default, &lt;code&gt;EpochMapInterval&lt;/code&gt; is set to 180 seconds. You must set &lt;code&gt;EpochMapInterval&lt;/code&gt; to a value greater than or equal to the &lt;code&gt;AdvanceAHMInterval&lt;/code&gt; parameter:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT node_name, parameter_name, current_value FROM CONFIGURATION_PARAMETERS
     WHERE parameter_name=&amp;#39;EpochMapInterval&amp;#39; OR parameter_name=&amp;#39;AdvanceAHMInterval&amp;#39;;
 node_name |   parameter_name   | current_value
-----------+--------------------+---------------
 ALL       | EpochMapInterval   | 180
 ALL       | AdvanceAHMInterval | 180
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;During &lt;a href=&#34;../../../../en/admin/failure-recovery/&#34;&gt;failure recovery&lt;/a&gt;, the database uses the &lt;code&gt;EpochMapInterval&lt;/code&gt; setting to determine which epoch is reported as the last good epoch (LGE).&lt;/p&gt;
&lt;h2 id=&#34;history-retention-and-purge-workflows&#34;&gt;History retention and purge workflows&lt;/h2&gt;
&lt;p&gt;OpenText recommends that you configure your epoch parameters to create a purge policy that determines when deleted data is purged from disk. If you use &lt;a href=&#34;../../../../en/data-analysis/queries/historical-queries/&#34;&gt;historical queries&lt;/a&gt; often, then you need to find a balance between saving deleted historical data and purging it from disk. An aggressive purge policy increases disk utilization and improves query performance, but also limits your recovery options and narrows the window of data available for historical queries.&lt;/p&gt;
&lt;p&gt;There are two strategies to creating a purge policy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;HistoryRetentionTime&lt;/code&gt; to specify how long deleted data is saved (in seconds) as an historical reference.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;code&gt;HistoryRetentionEpochs&lt;/code&gt; to specify the number of historical epochs to save.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../en/admin/working-with-native-tables/removing-table-data/purging-deleted-data/setting-purge-policy/#&#34;&gt;Setting a purge policy&lt;/a&gt; for details about configuring each workflow.&lt;/p&gt;
&lt;p&gt;Setting &lt;code&gt;HistoryRetentionTime&lt;/code&gt; is the preferred method for creating a purge policy. The database sets this value to &lt;code&gt;0&lt;/code&gt; by default, so the AHM is 1 less than the current epoch when the database is running properly. You cannot execute historical queries on epochs that precede the AHM, so you might want to adjust this setting to save more data between the present time and the AHM. Another reason to adjust this parameter is if you use the &lt;a href=&#34;../../../../en/admin/using-admin-tools/admin-tools-reference/advanced-menu-options/rolling-back-db-to-last-good-epoch/&#34;&gt;Roll Back Database to Last Good Epoch&lt;/a&gt; option for manual roll backs. For example, the following command sets &lt;code&gt;HistoryRetentionTime&lt;/code&gt; to 1 day (in seconds) to provide a wider range of epoch roll back options:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DATABASE vmart SET HistoryRetentionTime = 86400;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The database checks the status of your retention settings using the &lt;code&gt;AdvanceAHMInterval&lt;/code&gt; setting and advances the AHM as necessary. After the AHM advances, any deleted data in an epoch that precedes the AHM is purged automatically by the Tuple Mover &lt;a href=&#34;../../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout process&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to disable any purge policy and preserve all historical data, set both &lt;code&gt;HistoryRetentionTime&lt;/code&gt; and &lt;code&gt;HistoryRetentionEpochs&lt;/code&gt; to &lt;code&gt;-1&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DABABASE vmart SET HistoryRetentionTime = -1;
=&amp;gt; ALTER DATABASE vmart SET HistoryRetentionEpochs = -1;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you do not set a purge policy, you can use &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/epoch-functions/&#34;&gt;epoch management functions&lt;/a&gt; to adjust the AHM to manually purge deleted data as needed. Manual purges are useful if you need to update or delete data uploaded by mistake. See &lt;a href=&#34;../../../../en/admin/working-with-native-tables/removing-table-data/purging-deleted-data/manually-purging-data/#&#34;&gt;Manually purging data&lt;/a&gt; for details.&lt;/p&gt;

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