Implement stored procedure and scheduled events for partition creation and pruning. Every day a partition for tomorrow should be created, and partitions that exceed retention period should be dropped
Query retention period environment variable interpretation should be converted to days, round up, and then that number of daily partitions should be kept, e.g. 40h should become 2d and acted upon accordingly.
This will make data pruning near-instantaneous, and space reclamation much more effective.
Tables:
This will make data pruning near-instantaneous, and space reclamation much more effective.