You can use the provided scripts to rapidly purge large numbers of events from the event database.
The default data store plug-in provides a set of utilities you can use to periodically perform a rapid purge of large numbers of old events from the event database. These utilities are distinct from the eventpurge.jacl event server command, which deletes events matching specified criteria.
The rapid purge capability uses the concept of buckets. A bucket is a set of tables used to store events in the event database. The default data store plug-in uses two buckets:
Each event is stored in only one bucket. From the perspective of an event consumer, the distinction between the active and inactive buckets is invisible; a consumer can query, modify, or delete a specific event without knowing which bucket the event is stored in. The advantage of this approach is that the inactive bucket can be rapidly purged using database-specific interfaces without affecting the active bucket; normal event traffic can continue even while the purge operation is taking place.
After the inactive bucket is purged, you can then swap the buckets so that the active bucket becomes inactive and the inactive bucket becomes active. Swapping buckets is possible only when the inactive bucket is empty.
If you want to use the fast purge capability, it is your responsibility to determine how frequently to swap buckets or purge the inactive bucket, depending upon event traffic, storage space, archival requirements, or other considerations.