Deleting the records from the FACT table in Db2 Database Software
Perform this procedure to delete FACT records from a Db2 database.
Connect to the source database.
Execute the following script:
DELETE FROM PR_DATA_IH_FACT WHERE PXOUTCOMETIME < TO_DATE(<DATE_STRING>, <DATE_FORMAT_STRING>);
DELETE FROM PR_DATA_IH_FACT WHERE PXOUTCOMETIME < TO_DATE('0015-01-07 00:00:00', 'yyyy-dd-mm hh24:mi:ss')
- Applying sample scripts for archiving and purging
The interaction history tables contain transactional data which may grow fast. By using the sample scripts, the users can archive the data in the archiving database and delete (purge) the records from the source database. The scripts allow you to move the FACT table records, merge the Dimension records, and delete the records from the FACT table. Before you use any of the scripts, back up the source and target interaction history tables and create indexes on the columns. Indexes improve performance when you read data from the archived tables.
- Applying interaction history scripts in Oracle databases
Use interaction history scripts with Oracle databases to archive or purge the interaction history tables on Windows OS. The scripts allow you to move the FACT table records, merge the Dimension records, and delete the records from the FACT table.