Implementing a data maintenance strategy
By implementing an effective data maintenance strategy when a site goes live, you can avoid database issues such as performance degradation, exceeding available storage, and increased backup and restore times.
Creating an effective data maintenance strategy involves the following tasks:
1. Identify the data to maintain
Monitor database table size and growth rate and collect growth statistics from the production database on either a weekly or monthly basis. You are recommended to collect this information during the weekend to prevent disruptions to work that is being completed during the week. The method that you use to track database growth over time depends on your database type.Option | Description |
---|---|
dbgrowth utility |
|
dbgrowth utility |
|
Oracle Flashback Technology | Oracle Flashback Technology is a group of Oracle database features that you
can use to view the past states of database objects. You can also
return database objects to a previous state without using
point-in-time media recovery. Use Oracle Flashback Technology to track historical table data. For more information about using Oracle Flashback Technology, see Oracle Technology Network. Search for Oracle Flashback Technology. |
tips:
- Use the growth statistics to identify data that can be deleted from fast growing tables or that can be moved to a different database. The following database tables are typically the fastest growing tables:
- If you frequently delete folders in a production environment, run dbclean on the FOLDER table regularly.
- Review the list of default delete scenarios for particular object and type combinations to determine which database tables and which rows to delete for a particular object and object type. For more information, see Database Cleanup utility objects.
2. Define policies
A policy definition describes the length of time to keep information in the database before it is moved to a Decisions Support System (DSS) or cleaned up. Policies that reflect your current business practices help to maintain a consistent database. For example, the following sample policies define how to long to keep order and guest user information:- The length of time to store completed orders in the database.
- The number of days before a guest user with no completed orders is deleted.
- The length of time to store pending orders for guest and registered users.
3. Enforce policies with scripting
The Database Cleanup utility is a WebSphere Commerce utility that is designed to help you clean up the database. This utility contains a predefined list of delete statements to delete common WebSphere Commerce objects such as users, orders, and catalog data. Tune the default statements that are available for use with the script to correspond to your customized settings. This customized script removes records that are marked for deletion, as well as any information that is defined as outdated in your database maintenance policies. For more information, see Database Cleanup utility.Testing
Use both functional and nonfunctional testing to verify your data maintenance strategy.Type of testing | Description |
---|---|
Functional | Use functional testing to verify that the deletions performed when
dbclean runs are correct:
|
Nonfunctional | Use nonfunctional testing to determine the system resources that are required
to support the dbclean utility. To perform this type of testing, you must have a
performance environment and the ability to simulate load. Running the dbclean
utility might add the following types of stress to the system:
|