Subject Re: [firebird-support] Sweep Interval
Author James
Hi Helen

Helen Borrie wrote:

>At 05:00 PM 12/01/2004 +0800, you wrote:
>
>
>
>>Last question. You say that commit is much favorable because it uses
>>less cpu and etc. but how about the resources needed to connect
>>
>>
>
>A lot. But you don't connect every time you start a transaction. You do
>it once per session.
>
>
>
>> or open transaction
>>
>>
>
>You don't open a transaction. You start it and you commit it (or roll it
>back).
>
>
>
>>or open table again?
>>
>>
>
>You never "open a table" either. You start a transaction, then you query
>the table and get an image back, which is one or more rows. This image
>stays the same until you requery the table(s) and get a fresh image. Your
>client application does what it wants with this image: it can pick up a
>row at a time and move it somewhere else (e.g. into a buffer) or it can
>fetch groups of rows and leave some still waiting on the server. If you
>use a "dataset" component, you are storing this image - not physical data
>from the database. Your application never touches that.
>
>
>
>>Could this be not take to long?
>>
>>
>
>Well, since I know you are using IBO, you have all the gadgetry to minimize
>the amount of stuff that has to happen for you to get a fresh view of the
>data that match your query specification. Apart from that, I don't
>understand the question.
>
>
>
Thanks for correcting some of the wrong terms I have use. What I mean by
"Could this be not take to long?" is having
using
method A
ib_query.post;
ib_transaction.commit;
ib_transaction.start;
ib_query.open;

vs
method B
ib_query.post;
ib_transaction.commitretainning;

May I know your opinion concerning method A and B?

Thanks for you additional note on the things happening when Delphi has
to do the commit when the application closes. I greatly appreciate it.

James