Subject | RE: [IBO] How to prevent deadlock ??? |
---|---|
Author | Alan McDonald |
Post date | 2002-11-13T12:15:17Z |
I thought I had a smart idea recently and set all my report queries to their
own connection/transaction and set the transaction to read-only... thinking
that this might improve performance, reduce the chance of transaction
conflicts etc...
I suddenly started getting no wait transaction deadlocks... took me a while
to realise that it was the report transactions. I set them all to rollback
when the report was finished or cancelled and all was fine again.
I wonder now... with a read-only transaction... is it better to rollback or
commit them after I'm done with them? Or does it make absolutely no
difference?
Alan
own connection/transaction and set the transaction to read-only... thinking
that this might improve performance, reduce the chance of transaction
conflicts etc...
I suddenly started getting no wait transaction deadlocks... took me a while
to realise that it was the report transactions. I set them all to rollback
when the report was finished or cancelled and all was fine again.
I wonder now... with a read-only transaction... is it better to rollback or
commit them after I'm done with them? Or does it make absolutely no
difference?
Alan
> -----Original Message-----
> From: Svein Erling Tysvaer
> [mailto:svein.erling.tysvaer@...]
> Sent: Wednesday, 13 November 2002 23:07
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] How to prevent deadlock ???
>
>
> My helpfile states:
> "When there is a conflict or deadlock condition, this property determines
> whether an error should be returned immediately or should wait until the
> uncommitted changes are resolved."
>
> I read this as if there is a deadlock and LockWait is false, then you get
> the error - whereas if LockWait is true, you may have to wait for a long
> time before anything happens (e.g. if the person having done the
> successful
> update have gone to lunch or whatever without committing).
>
> Nothing rollbacks unless you say so.
>
> Set
>
> At 22:36 13.11.2002 +1100, you wrote:
> >If he had lockwait set to false... why would there be a
> deadlock? The second
> >update would just roolback .. no?
> >Alan
>
>
>
> __________________________________________________________________
> _________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________________
> _________
> http://www.ibobjects.com - your IBO community resource for Tech
> Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>