This is on the roadmap to implement for OH 2 (or maybe it was in Habmin 2, can’t remember which) but today there is no way to do this from OH.
I personally use a tiered persistence approach which uses MapDB for restoreOnStartup, rrd4j for stuff I need to chart of get historic data, and only uses MySQL (or some other external DB) for Items that I need to keep the data around forever or expose it to external apps. This means I have no need for DB maintenance at all.
you could look at persisting your sensor readings in a time-series database such as influxdb. It has built in mechanisms to clear out older data, so you don’t have to do it. You just set up the policy.