Originally posted by David Harkness:
Parse SQL (small)
Actually, as I think about it, the database also needs to "compile" the statement, to decide on how to execute it etc., and the time needed for this *can* be significant (not sure for a simple update statement).
That could be another argument for using the same statement (as a PreparedStatement) for all updates and only changing the parameters, because in this case the the database can cache and reuse the compiled statement (notice that I'm no expert, so I might be missing something, or using terminology strangely...).
If you have to do many updates in a row (pun not intended), you could even use a batched update, which can significantly reduce the communication overhead with the database (I once cut the time in half for updating some hundred rows, just by using a batched update).
Hope this helps...