Improve performance: db maintenance is now performed at plugin startup