Avoid closing/opening the database