Better pool deletion sql script