Subject Slow insert on Xeon based computers
Author evamp28
I'm wondering if any one else has experienced this problem with
firebird. I am using the default installations of firebird on Windows,
with only one client connection and no other applications running.

I've tested this on Firebird 1.5.3 and Firebird 2.0.1. All flavours
(embedded, super server, classic)

So far two Xeon machines exhibit this behaviour:

Windows 2003 for Small business Server SP1
2X Intel Xeon 3.0GHz CPU
1GB Memory
250GB of storage RAID1

(other machine is same, except 2GB RAM and no RAID)

The Workstation configuration is:

Windows XP 2002 (SP2)
Pentium 4 CPU (3.2GHz)

Inserting 100000 records into an indexed column on a Xeon computer (4
logical CPUs) is much slower than Hyperthreaded workstation (2 logical
CPUs).

The following benchmarks were performed using the script with and
without indexing using the specs defined in the Environment section above:

Workstation (test script with indexing): 50 seconds (CPU utitlisation
remains high)
Xeon (test script with indexing): 2 minutes 40 seconds (CPU
utilisation drops to about 2 percent)

Workstation (without indexing script): 40 seconds (CPU utilisation
remains high)
Xeon (without indexing script): 40 seconds (CPU utilisation remains high)

Test script with index:

CREATE DATABASE 'localhost:C:\Dev\SourceSafe\CURRENT DEVELOPMENT\STM
Server\STMServer\Database\TESTDB.FDB' DEFAULT CHARACTER SET ASCII;
COMMIT;

CREATE TABLE Prices (
id integer

);

CREATE INDEX PricesKey ON PRICES (id);

Test script without index:

CREATE DATABASE 'localhost:C:\Dev\SourceSafe\CURRENT DEVELOPMENT\STM
Server\STMServer\Database\TESTDB.FDB' DEFAULT CHARACTER SET ASCII;
COMMIT;

CREATE TABLE Prices (
id integer

);

Create a file and repeat the following lines 100000 times, where X is
some random number that is different on every line.
INSERT INTO PRICES (id) VALUES(X);

The only solution, I can find is to disable the index when inserting a
large number of records on Xeon based systems.