I don't believe it would make any difference... NOT doing the rollback would maybe save a couple of CPU cycles, but unless you're trying to squeeze EVERY, LAST cycle out of your CPU, I wouldn't bother...
What's the underlying reason you're asking?
Cheers,
~p
On Fri, 2007-03-09 at 11:03 +0100, Jan Danielsson wrote:
Hello all,
If I perform an update on a table which doesn't contain any rows to
update, should I perform a rollback? I realize that the transaction is
lost when the connection is closed, but is it technically correct to do so?
I have this (psudo code):
-------------------------
UPDATE sessions SET last_access=current_time WHERE id='foo'
if crsr.rowcount == 1:
conn.commit()
else
# No entries found
conn.rollback()
-------------------------