Subject Re: [firebird-support] Re: Simultaneous inserts / selects
Author Doychin Bondzhev
On 9.10.2014 �. 14:32 �., brucedickinson@... [firebird-support] wrote:
> Thank you guys for your input! I appreciate it!
> I have some doubts.. isn't TCP/IP a bottleneck here? I mean, I am
> sending for example 4 times (4 threads) more data to insert via network.
> @Doychin I do have like 2-3 indexes per table but the speed in single
> thread was sufficient. Thanks, I hope my quest will give me some nice
> results:)
> @Kjell Could you shed some more information about your solution? So you
> first insert data to external table and then you move all that data at
> once into the main table?
> @Dmitri 300 threads? The question is how many of them are hitting the
> database at the same time?
> I have one more generall question, do you perform your inserts one by
> one, I mean:
> StartTransaction;
> Insert;
> Insert;
> Insert;
> Commit;
> or do you generate a batch script? a text file which have in it 1000
> records, or 10000 or more?

Can't you use insert with parameters? This way you will prepare the
statement only once and just execute it many times with different

Doing insert with multiple statements without parameters can hurt
performance. Statement must be prepared every time and that takes time
and round-trip to the server.

What language/library you will use to do this job?

regarding the size of batch you can do some testing. performance might
depend on the number of threads in this case.

You need to find the right balance because in case of failure the whole
batch will fail.

Doychin Bondzhev
dSoft-Bulgaria Ltd.
PowerPro - billing & provisioning solution for Service providers
PowerStor - Warehouse & POS
Mobile: +359888243116

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