Subject Re: [IBO] Slower than the BDE???
Author Hans Hoogstraat
Hello Ron, I experienced 2.5 to 5 times procedure speed increase on the
server
depending on size of table, using

FOR SELECT prod_name
FROM inventory FOR UPDATE
INTO :prod_name
AS CURSOR ACURSOR
DO BEGIN
UPDATE inventory SET prod_name = :prod_name
WHERE CURRENT OF ACURSOR;
END

over

FOR SELECT prod_name,prod_uniquenum
FROM inventory FOR UPDATE
INTO :prod_name,:prod_uniquenum
DO BEGIN
UPDATE inventory SET prod_name = :prod_name
WHERE prod_uniquenum = :prod_uniquenum;
END

Maybe if you modify your server procedure along the same line,
your user interface may become time acceptable for the moment
and then when you spot the real culprit in your server/client setup,
it could really fly :)

Best Regards
Hans

---------------------------------------------------------------------------
----- Original Message -----
From: "Ron Roberts" <ron@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, July 30, 2004 12:36 PM
Subject: [IBO] Slower than the BDE???


> Howdy -
>
> Having recently converted my Delphi c/s application to IBO from the BDE,
I'm
> finding that in most areas I am running 2x to 3x faster than I did with
the
> BDE. However, I have discovered a few places where things have slowed a
bit.
> And I have one thing which has slowed substantially -- and in a most
> counter-intuitive way.
>
> Same computer, same database, same data, same server (Firebird 1.5), gdb
> file is on the local hard drive accessed via TCP/IP -- the BDE version of
my
> application creates and executes this server-side procedure in 1:23
minutes
> while the IBO version does it in 9:31. Its hard to imagine that there is
any
> difference at all since its a server-side procedure we are talking about.
>
> But in the event someone has an idea about why this might be happening,
here
> is my slow-running code:
>
> with MyIBOQuery do begin
> SQL.Clear;
> ParamCheck := FALSE;
> Params.Clear;
> SQL.Add('create procedure COPY_'+ExtractNumber(CISDtlTable));
> SQL.Add('AS');
> SQL.Add(' DECLARE VARIABLE id integer;');
> SQL.Add(' DECLARE VARIABLE mp double precision;');
> SQL.Add(' DECLARE VARIABLE rm varchar(256);');
> SQL.Add(' DECLARE VARIABLE fo varchar(256);');
> SQL.Add('BEGIN');
> SQL.Add(' FOR select ct.CISID, ct.MILEPOST, ct.C_REMARKS,
ct.C_INFO');
> SQL.Add(' from CIS_TEXT ct, '+CISDtlTable+' dt');
> SQL.Add(' where (ct.CISID = dt.CISID)');
> SQL.Add(' and (ct.MILEPOST = dt.MILEPOST)');
> SQL.Add(' into :id, :mp, :rm, :fo DO');
> SQL.Add(' update '+CISDtlTable+' set C_REMARKS = :rm, C_INFO =
:fo
> where (CISID = :id) and (MILEPOST = :mp);');
> SQL.Add('END;');
> ExecSQL;
> SQL.Clear;
> SQL.Add('execute procedure COPY_'+ExtractNumber(CISDtlTable));
> ExecSQL;
> end;
>
> Thanks in advance for any pointers.
>
> -- Ron
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>