Subject Basic tests shows very poor performance
Author grostoon
Hi all,

In order to validate my build of FB 1.5 for AIX 5.1, I made a few tests with
isql and
I found a basic test for which FB is very very slow. I first suspected my
AIX build; but doing
the same test on a Linux box produced the same behaviour.

Here is the test :

create database 'test.fdb';
create table tbl1 (name char(10), age integer);
create table tbl2 (name char(10), age integer);
create index idx1 on tbl1 (name);
create index idx2 on tbl2 (name);
create index idx3 on tbl1 (age);
create index idx4 on tbl2 (age);
insert into tbl1 values ('aaaa', 1);
insert into tbl1 values ('bbbb', -20);
insert into tbl2 select * from tbl1;
insert into tbl1 select * from tbl2;
commit;
insert into tbl2 select * from tbl1;
insert into tbl1 select * from tbl2;
commit;
... sequence repeated until there are about 300000 rows in tbl1 and tbl2
insert into tbl2 select * from tbl1;
insert into tbl1 select * from tbl2;
commit;

Now, activate stats : set stats;
Then select count(*) from tbl1 gives :
COUNT
============

392836
Current memory = 1506128
Delta memory = 196
Max memory = 1711452
Elapsed time= 0.41 sec
Cpu = 0.00 sec
Buffers = 75
Reads = 5244
Writes = 0
Fetches = 796154

Then do a delete from tbl1;
Current memory = 1702324
Delta memory = 196380
Max memory = 1711452
Elapsed time= 1.28 sec
Cpu = 0.00 sec
Buffers = 75
Reads = 5245
Writes = 5165
Fetches = 1974662

commit;
Current memory = 1493880
Delta memory = -208444
Max memory = 1711452
Elapsed time= 0.00 sec
Cpu = 0.00 sec
Buffers = 75
Reads = 2
Writes = 75
Fetches = 2


And now redo a select count(*) from tbl1 :
COUNT
============
0

Current memory = 3837432
Delta memory = 2338664
Max memory = 3837536
Elapsed time= 3346.55 sec
Cpu = 0.09 sec
Buffers = 596
Reads = 210708549
Writes = 793226
Fetches = 228875455

As you can read, it takes 3346.55 sec of elapsed time (on an Athlon XP
2600+) !!!

Is this a known issue/bug ?
What can be done to get acceptable performance ? (any patch needed ?)

Regards,

Toon.


---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

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