Log Cleaning and Housekeeping
You are looking at an older version of the documentation. The latest version is found here.
Analytical Storage Cleanup
Over time, the Data Virtuality Server handles a huge amount of queries. These queries generate a considerable amount of log entries, and not all of them will be required in the future.
For example, if an optimization creates several stages (mat tables), not all of them will ever be needed again, so they can be dropped. Also, it is not always necessary to keep log entries indefinitely. Huge amounts of log entries will also increase the time it takes to display them.
Data Virtuality Server offers the ability to perform cleanup operations to remove obsolete data automatically. The Data Virtuality Server is shipped with a specific job that can get rid of outdated materialization stages. A certain number of old materialization stages can still be kept as a fallback (e.g., when importing a backup), but it is not needed to keep all materialization stages. The cleaner job performs a refresh on all information regarding optimizations and then gathers the knowledge about which materialization stages can be safely dropped. There are several reasons to run the cleaner job:
- reduce the amount of data in the analytical storage;
- keep only the most current data;
- there are no internal entries in the configuration database which are not used;
- improves lookup time of analytical storage tables;
- improves index management since only useful indexes are being kept.
You can run the cleanup task via Data Virtuality Studio from the Jobs tab, or you can create a schedule attached to it. Here is an example (the job always has jobId
1):
CALL SYSADMIN.createSchedule(jobId => 1, type => ?, intervl => ?, startDelay => ?, cronExpression => ?, enabled => ?, chainString => ?);;
-- start the cleaner once and immediately with
CALL SYSADMIN.createSchedule(jobId => 1, type => 'once', intervl => 0, startDelay => 0, cronExpression => NULL, enabled => TRUE, chainString => NULL);;
The cleaner job will take some time and requires system resources. It is recommended to run the job when it does not interfere with the users' workload.
Cleanup of Query Logs and Job Logs
The Data Virtuality Server has several stored procedures for cleaning up logs. For detailed information, please refer to the Log and History Management section of the Management API Guide.
Please note that only the data from the configuration database tables will be deleted; the entries will still exist in the server.log file.
See Also
Get Usage of Views (for Cleanup and Other Purposes) for a ready-to-use snippet enabling you to see how often different views are used
Get the Recent N Stages of Mat Tables and Create a Procedure to Drop Old Ones for a guide on how to get rid of obsolete materialized table stages