Long running compression job is a common issue faced in the production environment for cubes containing huge data. The job remains in the active state and eventually has to be killed and restarted. The compression job generally spends most of its time in deleting and realigning the indices of the cube tables. The following activities are performed on the cube tables during compression:
- Indices on the F-Table are deleted and rearranged
- Indices on the E-Table are populated
Proper Index management of these tables can help reducing the time taken for compression considerably.
Step by Step Solution with Example
Check the existence of secondary indices (040) for both the E and F Tables of the cube. The indices need to be present.
This can be checked via TCode SE11/SE12 -> Provide E/F table -> Indexes Option.
Also check the P Index of the E Table for its existence.
The 040 index on the E-Table needs to be dropped before the compression job. This can be achieved via TCode SE14 -> Provide E-Table name of the cube -> Indexes Option
Once the index on the E-Table is deleted, the compression activity can be started for the cube. The compression time will be reduced by almost 70 percent of its initial time.
On completion of compression job, the deleted indices need to be recreated for the E-Table. This can be achieved also from TCode SE14 -> Indexes Option
Automation of the Activity
In the production system, there might be a need to automate this activity and be used in Process Chains to avoid manual work or intervention. This can be achieved with help of following two function modules:
- RSDU_INFOCUBE_INDEXES_DROP – To drop indices on the E-Table of the Cube
- RSDU_INFOCUBE_INDEXES_REPAIR – To create indices on the E-Table of the Cube
Two ABAP programs need to be created one for each above FM with appropriate parameters. These ABAP program then can be used before and after the Compression Step of Process Chain. This will help to reduce the manual activity involved in the task.