Subject FB 2.5.0 RC2 update test
Author Hans
Hi, I have a table with a primary key 'prod_uniquenum' integer,
and a field 'prod_name' varchar(40) plus a bunch of other fields
describing the products.

For years, I have a little test procedure laying around,
which tests if a simple update using a CURSOR is faster
than an update using WHERE.

This all worked like a charm during the FB developments till FB 2.1.3,
but FB2.5.0RC2 just hangs solid when running that procedures.

Database has been converted to the FB2.5.0 ODS 11.2 via backup and restore

The test is not important to me, but it may possible show a problem
with FB2.5.0 Super and SuperClassic under XP

Best Regards
Hans

'SELECT * FROM ACURSOR_FAST_UPDATE' to run the procedure

ALTER PROCEDURE ACURSOR_FAST_UPDATE
RETURNS ( STATUS1 DECIMAL ( 18, 9 )
, STATUS2 DECIMAL ( 18, 9 ) )
AS
DECLARE TSTART TIMESTAMP;
DECLARE TEND TIMESTAMP;
DECLARE VARIABLE PROD_NAME VARCHAR(40);
DECLARE VARIABLE PROD_UNIQUENUM INTEGER;

BEGIN

TSTART = 'NOW';

/* FASTER THEN NEXT UPDATE LOOP */

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

TEND = 'NOW';

STATUS1 = (TEND - TSTART) * 86400 ; /* MS */


TSTART = 'NOW';

/* SLOWER THEN PREVIOUS UPDATE LOOP */

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

TEND = 'NOW';

STATUS2 = (TEND - TSTART) * 86400 ; /* MS */

SUSPEND;
END