Re: Use of ROLLBACK
Posted in 2000
In article <8alv56$c31@netnews.state.az.us>, FProse
<fprose@rocketmail.com> writes
>We have an application development group that has put together an
>application that primarily queries a database. While many read I/O's take
>place (no attempt has been made to optimize queries) the development group
>claims that they are not updating so I'll assume most of the writes could be
>attributed to things like hash joins, sorting, or grouping. The database is
>logged, unbuffered.
>
>Here's the question. For some reason, they coded the application to issue a
>ROLLBACK at the conclusion of a transaction. For example:
>
>Begin work;
>Select..
>Select.
>Select.
>Rollback;
>
>This is not used because they wish to "change their mind" - a standard
>inquiry uses ROLLBACK. Where they actually want to save any data, they
>obviously use a commit.
>
>Off the top of my head I can't think that this is a very efficient way of
>releasing held locks. They claim it shouldn't make any difference because
>they didn't modify anything. Yet, like a mentioned above, I see 'write' I/O
Rollback records are still written to the logical log. Closing the
open cursor will free any locks held. No need to commit. Sounds like
the developers do not know what they are doing!!
>'s when I "onstat -u". An "onstat -p" doesn't show many rollbacks (relative
>to the
>
>Thoughts.comments.suggestions.
>
>
>
--
David Williams