Subject | Re: [Firebird-Java] Re: JayBird and large attachment |
---|---|
Author | Nickolay Samofatov |
Post date | 2003-08-11T13:13:10Z |
Hello, Roman,
isc_tpb_read - read-only (in this case transaction is started as pre-committed
and may not be committed without impact on the engine) ! Otherwise you are
going to inhibit garbage collection and may loose performance.
Nickolay Samofatov
> Hi,But you need to have transaction that is explicitly read-committed and
>> If I correctly understood, it may be better to disable autocommit.
> In general - yes.
>> So, when I'm querying a huge datbase with a SELECT statement that
>> returns hundred of thousand rows, when to do the commit? Between
>> each row retrivial and after a heuristic and prefined number (10,
>> 100, 1000...)? What is the best practice?
> Why do you need to do commit at all? For read-only selects you do not
> need to do commits. Firebird is an RDBMS with optimistic concurrency,
> this means that readers do not block writers. So, as long as you do
> not modify the row you will not get any lock conflict there.
isc_tpb_read - read-only (in this case transaction is started as pre-committed
and may not be committed without impact on the engine) ! Otherwise you are
going to inhibit garbage collection and may loose performance.
Nickolay Samofatov