Mysql persistence: maintenance scripts


I’m using Mysql Persistence and I was wondering if anyone could share how they maintain their openhab Mysql database.
The amount of entries in the items tables keeps on growing, so I’m looking for some hints an tips on how to maintain them.
for example: a sql script to erase all data older then… from all tables. a script to delete unused item tables, etc …

Thanks for your help and suggestions

Some late, just saw your post while searching something else. Here is an example for deleting old values from persistence (configured or some later: all older than x days):

1 Like

Just took the Quest and added Tutorial for deletion of tables from unused items after some time of Inactivity. Same Thread: