Hi *,
let's have this structure:
create database 'localhost:slower.fdb' user 'sysdba' password 'masterkey';
create table dummy (i integer);
set term ~;
recreate procedure foobar
as
declare cnt integer;
begin
delete from dummy;
cnt = 10;
while (cnt > 0) do
begin
insert into dummy values (:cnt);
cnt = cnt - 1;
end
delete from dummy;
end~
set term ;~
Running the block below, is reasonably fast. But...
set term ~;
execute block
as
declare x integer;
begin
x = 1000;
while (x > 0) do
begin
execute procedure foobar;
x = x - 1;
end
end~
set term ;~
...subsequent executions (inside same transaction) are getting roughly 1,5x-2x
slower every execution. Looking at the fetches and database pages usage it's
very likely because of the garbage the `foobar` produces. After the commit the
execution is at the initial time again, and then it gets slower and slower
again.
Or is this something else? And can it be improved?
Running WI-V3.0.4.33054 Firebird 3.0.
--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel