Subject | Re: [firebird-support] Design problem |
---|---|
Author | Helen Borrie |
Post date | 2003-06-20T11:47:04Z |
At 01:14 PM 20/06/2003 +0200, you wrote:
lowest to highest, in Delphi-talk) is ReadCommitted, Concurrency and
Consistency. You never need Consistency except when you want to "freeze"
the state of the database for your entire operation.
All you want to do here is insert new records while your reporting
procedure looks at some *other* records. Use two transactions - both
Concurrency or ReadCommitted, it won't matter much, since you are not doing
any updating. There is no potential for conflict here.
By using Consistency, you are making it so that your transaction blocks any
DML, even inserts, to preserve a frozen view of the whole database. In
fact the only thing you want to freeze is the batch of transactions from
the last shift, which the new shift doesn't even touch.
heLen
>I am a bit concerned at using snapshot - isn't that like doing a dirty read?No!!! Firebird doesn't support dirty read! The order of isolation (from
lowest to highest, in Delphi-talk) is ReadCommitted, Concurrency and
Consistency. You never need Consistency except when you want to "freeze"
the state of the database for your entire operation.
All you want to do here is insert new records while your reporting
procedure looks at some *other* records. Use two transactions - both
Concurrency or ReadCommitted, it won't matter much, since you are not doing
any updating. There is no potential for conflict here.
By using Consistency, you are making it so that your transaction blocks any
DML, even inserts, to preserve a frozen view of the whole database. In
fact the only thing you want to freeze is the batch of transactions from
the last shift, which the new shift doesn't even touch.
heLen