Subject | Re: [Firebird-Java] Re: table lock |
---|---|
Author | Nickolay Samofatov |
Post date | 2003-02-06T11:19:11Z |
Hello, Roman,
updates) is very likely to generate "Update conflict" exception during
concurrent locking/updating.
Explicit locks in FB1.5 never produce update conflicts
in isc_tpb_read_committed+isc_tpb_wait modes.
Implicit and explicit record locks are not equivalent in Firebird
>> > I need to update a group of records and while i do that no oneBut you should be aware that this method of locking records (dummy
>> > should read or update that group of record. The granularity of
>> > the operation should not be at record level but at group of
>> > records level. So i'm trying to acquire a table lock.
>>
>> Simply set transaction isolation level to TRANSACTION_SERIALIZABLE.
> And one more solution. Instead of making SELECT ... FROM ...
> WHERE ... FOR UPDATE (which does not work in FB 1.0) use UPDATE ...
> SET any_field = any_field WHERE ... This will lock your set of
> records without blocking the whole table. This method gives you
> better performance than TRANSACTION_SERIALIZABLE because it can also
> be used with TRANSACTION_REPEATABLE_READ and
> TRANSACTION_READ_COMMITTED.
updates) is very likely to generate "Update conflict" exception during
concurrent locking/updating.
Explicit locks in FB1.5 never produce update conflicts
in isc_tpb_read_committed+isc_tpb_wait modes.
Implicit and explicit record locks are not equivalent in Firebird
> Best regards,Nickolay Samofatov
> Roman Rokytskyy