Subject | Re: [IBDI] SPEED-- Product Comparisons |
---|---|
Author | Paul Gallagher |
Post date | 2000-09-03T18:21:12Z |
I really don't know how to do a proper benchmark, but I did some testing
anyway. <g>
Machine:
dual celeron 466mhz with 328 meg ram. WD 27gig HD with ultraDMA66,
Windows2000 Pro, running IB6 production release.
Basically, I just inserted 10,000 records with a TIB_DSQL component, with
one user, and checked for time.
The time averaged about 2.95, with a best of 2.85 seconds to insert the
10,000 rows. Thats 207,000 rows per minute. Using IBAffinity surprisingly
made little difference. It was slightly faster(maybe 5-10%) when using
processor 2 only. Using processor 1 was slightly slower. I suspect that
Win2k is better at processor management than NT4 was. Page size set to 4096
made a very slight improvement. Changing buffers to 5000, made no
difference.
I realize I have a fairly fast machine, but it is a CELERON, not a P3. The
time of 2.9 seconds beats anything I have seen out of MYSQL or PostgreSQL.
When I committed after every row, the time jumped to about 6.5 seconds. But
thats 1538 transactions per second!
Not very meaningful, because I could not do a side by side with other DBM's,
but it shows that Interbase is capable of some very impressive numbers.
Paul Gallagher
__________________
The Database:
CREATE DATABASE 'Benchmark.gdb'
USER 'SYSDBA'
PASSWORD 'masterkey'
PAGE_SIZE=4096;
create table TABLE1(
FIELD1 integer not null,
FIELD2 varchar(100) not null);
commit work;
alter table TABLE1 add constraint PK_TABLE1 primary key (FIELD1);
The DSQL:
INSERT INTO TABLE1 (FIELD1, FIELD2) VALUES
(?ONE, ?TWO);
And the code:
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
starttime,endtime,ElapTime:TDateTime;
s:string;
begin
IB_Transaction1.Commit;
s:='elsdksdflkjalialfdjlkaeru,skdflasidfualkjrlkaudflkjsdfljas;fuskljfslk;al
ksjfkasj';
StartTime:=now;
IB_Transaction1.BeginBusy(true);
IB_DSQL1.Prepare;
for i:=1 to 10000 do
begin
IB_DSQL1.ParamByName('ONE').Value:=i;
IB_DSQL1.ParamByName('TWO').Value:=s;
IB_DSQL1.ExecSQL;
end;
IB_Transaction1.Commit;
IB_Transaction1.EndBusy;
EndTime:=now;
ElapTime:=EndTime-StartTime;
Label1.Caption:=FloatToStr(ElapTime*86400)+' seconds';
IB_Connection1.Disconnect;
end;
anyway. <g>
Machine:
dual celeron 466mhz with 328 meg ram. WD 27gig HD with ultraDMA66,
Windows2000 Pro, running IB6 production release.
Basically, I just inserted 10,000 records with a TIB_DSQL component, with
one user, and checked for time.
The time averaged about 2.95, with a best of 2.85 seconds to insert the
10,000 rows. Thats 207,000 rows per minute. Using IBAffinity surprisingly
made little difference. It was slightly faster(maybe 5-10%) when using
processor 2 only. Using processor 1 was slightly slower. I suspect that
Win2k is better at processor management than NT4 was. Page size set to 4096
made a very slight improvement. Changing buffers to 5000, made no
difference.
I realize I have a fairly fast machine, but it is a CELERON, not a P3. The
time of 2.9 seconds beats anything I have seen out of MYSQL or PostgreSQL.
When I committed after every row, the time jumped to about 6.5 seconds. But
thats 1538 transactions per second!
Not very meaningful, because I could not do a side by side with other DBM's,
but it shows that Interbase is capable of some very impressive numbers.
Paul Gallagher
__________________
The Database:
CREATE DATABASE 'Benchmark.gdb'
USER 'SYSDBA'
PASSWORD 'masterkey'
PAGE_SIZE=4096;
create table TABLE1(
FIELD1 integer not null,
FIELD2 varchar(100) not null);
commit work;
alter table TABLE1 add constraint PK_TABLE1 primary key (FIELD1);
The DSQL:
INSERT INTO TABLE1 (FIELD1, FIELD2) VALUES
(?ONE, ?TWO);
And the code:
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
starttime,endtime,ElapTime:TDateTime;
s:string;
begin
IB_Transaction1.Commit;
s:='elsdksdflkjalialfdjlkaeru,skdflasidfualkjrlkaudflkjsdfljas;fuskljfslk;al
ksjfkasj';
StartTime:=now;
IB_Transaction1.BeginBusy(true);
IB_DSQL1.Prepare;
for i:=1 to 10000 do
begin
IB_DSQL1.ParamByName('ONE').Value:=i;
IB_DSQL1.ParamByName('TWO').Value:=s;
IB_DSQL1.ExecSQL;
end;
IB_Transaction1.Commit;
IB_Transaction1.EndBusy;
EndTime:=now;
ElapTime:=EndTime-StartTime;
Label1.Caption:=FloatToStr(ElapTime*86400)+' seconds';
IB_Connection1.Disconnect;
end;