IBM Support

[Db2] BACKUP and/or LOAD elapsed time is getting longer even with almost the same amount of data.

Question & Answer


Question

The execution time of the BACKUP and/or the LOAD command(s) is gradually getting longer. The amount of data has not increased so much. How can I solve it ?

Cause

The BACKUP or the LOAD utility updates the database recovery history file. If the size of the recovery history file is very large, it takes long time to open the file or scan entries in the file. This may impact the performance of  the BACKUP and/or the LOAD command(s).

Answer

It's recommended to prune unnecessary entries in the recovery history file in order to avoid the file size from becoming too large. 
You can use the PRUNE command to remove entries prior to a specific date.
For example, if you would like to remove entries older than Jan 1, 2010:
$ db2 PRUNE HISTORY 20091231235959

The database configuration parameter "rec_his_retentn" specifies the number of days that the entries in the recovery history file are retained (default is 366 days in V11.1 or before. In V11.5 it's 90 days). You may consider specifying smaller value to avoid the recovery history file from becoming too large.
Note:
The "rec_his_retentn" parameter is referenced when a BACKUP DATABASE command is executed. If you do not execute a BACKUP DATABASE command, "rec_his_retentn" parameter does not have any effect.

Operational consideration
Whether each entry in the recovery history file is necessary or not depends on your own system's requirement.
Before removing any entry, you should consider if it is really unnecessary.

Related informaiton
Recovery history file
PRUNE HISTORY/LOGFILE command
rec_his_retentn - Recovery history retention period configuration parameter
 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"OTHER - Uncategorised","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1;10.1;10.5;11.1;11.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 October 2019

UID

ibm11076331