Add ip2dns & sessions to db_optimize()