Page 1 of 1

Is transaction NO AUTO UNDO possible/useful?

Posted: Tue 17 Jul 2018 21:23
by kneighbour
I am using Firebird 3 with UniDac and Delphi XE7. I am looking to speed up the interactions with Firebird, and I read that setting NO AUTO UNDO with some transactions can speed up things. I am using Unidac in default mode with the default transaction, so I am not using any custom transaction code.

Is it possible to set this option, or does Unidac take care of this for me?

Re: Is transaction NO AUTO UNDO possible/useful?

Posted: Wed 18 Jul 2018 11:37
by ViktorV
To set arbitrary transaction parameters, you should set the DefaultTransaction.IsolationLevel property to ilCustom, and set the parameters you need in the Params property. For example:

Code: Select all

UniConnection.DefaultTransaction.SpecificOptions.Values['Params'] := 'wait;read_committed;rec_version;no_auto_undo';

Re: Is transaction NO AUTO UNDO possible/useful?

Posted: Thu 19 Jul 2018 07:05
by kneighbour
Thanks - a good suggestion.

If I set the Connection.DefaultTransaction.Isolationlevel for one particular UniQuery, surly that will change the isolation level for all the other UniQueries that are in the application?

ie UniQuery.connection.DefaultTransaction.IsolationLevel := whatever - surely that will effect all Uni controls using that connection?

Re: Is transaction NO AUTO UNDO possible/useful?

Posted: Fri 20 Jul 2018 07:36
by ViktorV
Yes, you are right, the TUniConnection component and all datasets that work through it, use DefaultTransaction for all operation under data.
If you want to change the transaction settings only for a specific dataset, you can use a separate TUniTransaction component for this dataset.

Re: Is transaction NO AUTO UNDO possible/useful?

Posted: Mon 23 Jul 2018 00:06
by kneighbour
Good idea. Many thanks for the useful comments.

Re: Is transaction NO AUTO UNDO possible/useful?

Posted: Mon 23 Jul 2018 07:52
by ViktorV
Thank you for the interest in our products.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.