Subject Re: [firebird-support] Simultaneous inserts / selects
Author Doychin Bondzhev
On 3.10.2014 �. 12:00 �., brucedickinson@... [firebird-support] wrote:
> Hi,
>
> do you have any experience in selecting from / inserting to table from
> multiple threads? Is it faster in comparision to one thread which
> selects / inserts data in queue?
>
> What is your opinion on this? My gut tells me that it will be always
> slower in comparision to single thread. But maybe I am wrong and it is
> worth the hassle to use separate threads?
>
> Assumption here is that each thread pulls of data with different primary
> / secondary keys and also inserts with different keys.
>
> I would like to hear your opinion about this topic.
>
> Thanks you.

I did some experiments with this before and the results show that there
is some speedup when doing this on more then one thread but not with to
many threads. At some point threads start to be blocked by firebird locks.

So you better test for your specific configuration in order to find how
many parallel threads is good for you.

It all depends by hardware you are going to run this on. Also important
is the amount of indexes that your table will have that FB needs to
update during insert.

The best approach is to put as much as possible inserts into single
transaction and with single prepare statement.

I hope this will help you in your quest ;-)


>
>


--
Doychin Bondzhev
dSoft-Bulgaria Ltd.
PowerPro - billing & provisioning solution for Service providers
PowerStor - Warehouse & POS
http://www.dsoft-bg.com/
Mobile: +359888243116


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