If you have a database transaction that should be read only, do you commit or rollback? Is there any reason to do one or the other? Does one of the approachs improve database performance?
Some RDMS (at least Oracle ) have READ ONLY isolation level. Otherwise, I prefer
ROLLBACK since it doesn't create an entry in transaction log (a bit better from performance point of view).
Update Some explanations.
Most RDMS log all committed transactions and changes associated with transaction. Even if no changes are made, server logs a transaction. I don't see any points in wasting server resources by storing useless data.