"finish" $rc = $sth->finish; Indicate that no more data will be fetched from this statement handle before it is either executed again or destroyed. You almost certainly do *not* need to call this method. Adding calls to "finish" after loop that fetches all rows is a common mistake, don't do it, it can mask genuine problems like uncaught fetch errors.