sql handling changes, reduce round trips