7.7.1.3 Maintaining Partitions
Partition maintenance procedures remove old data from the database so that the database does not continue to grow until space is insufficient. Daily, weekly, or monthly maintenance is necessary for tables that have daily, weekly, and monthly partitions, respectively.
- Copy information related to open orders from the oldest partitions to temp
tables (
EXECUTION, ORDR, ORDR_EVENT, ORDR_STATE_CHANGE TRADE and TRADE_EXECUTION_EVENT
) - Drop the oldest partitions for all partition types.
- Insert the saved data into what is now the oldest partition (applicable to tables with open orders).
- Create new partitions.
- Recompile the views that scenarios use.
Managing Daily Partitioning Alternative
- Execute the
run_drm_utility.sh
shell script - Set the
drm_weekly_proc_flg
parameter to Y. For more information, refer to Table 7-17.
This procedure eliminates the must perform frequent index maintenance; Oracle recommends doing this for large market tables.
Note:
You must set theWEEKLY_ADD_FL
parameter in the
KDD_DR_MAINT_OPRTN
table to Y so that the procedure works
correctly. For more information about this parameter, refer to Table 7-19 Table,
for more information.
Partition Structures
-
Business data partitions are pre-defined so that weekdays (Monday through Friday) are business days, and Saturday and Sunday are weekly off-days. Business data tables use all partitioning types.
You can use the Calendar Manager Utility to configure a business calendar as desired. For more information about this utility, refer to Managing Calendar Manager Utility, for more information.
- Market data partitions hold a single day of data. The partitions use the
PYYYYMMDD
convention, whereYYYYMMDD
is the date of the partition.
Recommended Partition Maintenance
You should run partition maintenance as appropriate for your solution set. Oracle recommends that you run partition maintenance for AML on a daily basis (after setting the business date through the Calendar Manager Utility, and prior to the daily execution of batch processing), and Trading Compliance at least once a week.
Oracle recommends that you use the P (Partition) option when running the Data Retention Manager, as it drops older partitions and adds appropriate partitions in a single run of the utility.
Note:
If you ingest data belonging to a date less than the current date, you should run the DRM utility till current date. This avoids the error Partition Not Found while accessing trade records in Trade Blotter UI.Managing Alternative Monthly Partition
As part of an alternative method of monthly partition maintenance, you can either add or drop a monthly database partition. as described in the following section:
Adding a Monthly Database Partition
To add a monthly partition, run the utility’s shell script as follows
(refer to Table 7-17 for parameters):
run_drm_utility.sh AM M BUSINESS <object> N
where AM is the drm_operation
parameter that implies adding a
monthly partition.
Dropping a Monthly Database Partition
To drop a monthly partition, run the utility’s shell script as follows
(refer to Table 7-17 for parameters):
run_drm_utility.sh DM M BUSINESS <object> N
where, DM
is the drm_operation
parameter that
implies dropping a partition.