Subject Re: [firebird-support] Re: Hardware for firebird
Author Jonathan Neve
Hi Angel,

as1616z wrote:

>The hardware I will use is a two xeon processor, 4Gb, scsi hd and
>hardware raid. Actually the server runs firebird Super server with
>forcedwrites=on and Windows 2003.
>The application is one-thread, and I need to insert a record per time
>beause every record inserted requires a few additional queries based
>on some complex calc. The reason to insert 1 million records once a
>week is to generate bank payments that must be saved on database, and
>later generate an export csv file.
>The task is done locally, but I'm thinking about to use the server and
>other pc connected on a gigabyte NIC and do the inserts in parallel.
>
>
Perhaps you could consider doing this as a stored procedure, ie,
something like this:

create procedure pr_insert_data (field1, field2...)
as
begin
insert into table (field1, field2...) values (:field1, :field2...);
select complex_calculations from tables into :parameters;
select more_complex_calculations from other_tables into
:some_more_parameters;
...
end

Then, in your application, just do one EXECUTE PROCEDURE PR_INSERT_DATA
per record. This will probably be considerably faster than executing the
complex calcuation queries 1 million times from the client application,
even if you run it on the server.

If you are able to cut up your data into independant chunks, then making
your application multi-threaded (with one connection per thread) and/or
running multiple instances of the application could help a lot. If you
only have 2 CPUs, there is probably little to be gained however from
having more than 2 threads/connections.

>Firebird Classic will work fine on windows ? (I read that is
>experimental on windows).
>
>
Yes, it works fine for me, and I hear others are using it too. I think
the "experimental" status has been removed, and it should now be
considered stable.

--
Best regards,
Jonathan Neve
_______________
CopyTiger - advanced database replicator for Interbase/Firebird!
Web : http://www.microtec.fr/copycat/ct
_______________________________________
CopyCat - database replication components for Delphi/C++Builder!
Web : http://www.microtec.fr/copycat/cc