Add optimise to resetdb.php