Subject Re: [IBO] Big Batch...
Author Admin
Geoff, Jason -

I reviewed and ran the Blobinsert sample project. Didn't fully
understand all that you were recommending to do, but I got the message
loud and clear about using parameters. So I changed the code to work
like this:

dsql.SQL.Text := 'INSERT INTO SYMBOLS (SYMBOL) VALUES (:p)';
for i := 1 to tsl2.Count do
begin
p := pchar(tsl2.Strings[i-1]);
dsql.ExecSQL ;
end;

and that brought the time down to 39-42 seconds. Big improvement. Don't
quite understand why you emphasize creating a column reference, but I'll
try to figure it out and see if it improves the time even more.


So something
> like...
>
> var
> tmpCol: TIB_Column;
> i: integer;
> begin
> dsql.SQL.Text := 'INSERT INTO SYMBOLS (SYMBOL)' +
> ' VALUES (:SYMBOL)';
> dsql.Prepare;
> tmpCol := dsql.ParamByName( 'SYMBOL' );
> for i := 0 to tsl1.Count - 1 do
> begin
> tmpCol.AsString := tsl2.Strings[i];
> dsql.ExecSQL;
> // make the app responsive during long processing
> if (i mod 1000) = 0 then
> Application.ProcessMessages;
> end;
> end;
>
> Remember to use tmpCol.Clear if you want to insert a NULL value as IBO
> will not clear parameters between calls to ExecSQL.

> The IB6 client has a bug and will not support multiple threads at this
> time. (And besides which, even in IB5, you need to follow the
> directions for multiple threading in IBO - see the sample
> applications.)

That's good to know, obviously not IBO's fault as a product, but
disappointing in this day and age when a database product has to compete
with the likes of Oracle. I thought the only threading implication with
using IB was the 1 processor limit.

Any chance this will be changed(fixed?) in your firebird version?

Thanks again.

DK

[Non-text portions of this message have been removed]