New methods for affected rows and last insert ID, performace improvements