Subject Re: [firebird-support] Re: Performance when deleting a lot of records, again
Author Martijn Tonies
> > > >autocommit is often referred to as commit retaining.
> > >
> > > No. Autocommit works in different ways in different
> > > implementations. Delphi happens to use CommitRetaining when it does
its
> > > "client-side autocommit".
>
> At 02:50 PM 7/04/2005 +0200, Martijn "You can buy me with chocolate"
Tonies
> wrote:
>
> >Actually, not Delphi... But I guess you mean "IBX". I don't think IBO
> >does a CommitRetaining unless you tell it to.
>
> IBO doesn't do a CommitRetaining unless you tell it to make the
transaction
> AutoCommit. Then, it does. The only way to override that is to do
> explicit transaction starts and commits. CommitRetaining was invented for
> Delphi and it does have great benefits for Delphi's "scrolling"
> dataset. With IBO you can have butter on both sides of the bread,
provided
> you make use of the timeout features.
>
> Note that, with IBO, you can set the ServerAutocommit true. As long as
> Autocommit is false, you won't get a Commit with Retain happening. It's
> not used for SELECTs, though, since you do actually want a "live" cursor
on
> a dataset that you are working on. You're more likely to use
> ServerAutocommit for running scripts. For normal DML it's generally a
> pain, since you don't get any feedback on the client unless there's an
> exception and the statement has to be executed with ExecuteImmediate2 (no
> prepare).
>
> IBX makes transactions Autocommit by default (or used to, last time I
looked).
>
> >How about FIB+?
>
> Don't know; but I'd expect it to have the smarts not to make Autocommit
> the default.

So, probably the best for small resultsets would be to use the
TClientDataset
(or similar) component and have the server commit the SELECT ASAP.

:-)

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com