On 3.10.2014 ã. 12:00 ÷., brucedickin...@wp.pl [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] ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/