Subject Re: [firebird-support] Re: Simultaneous inserts / selects
Author E. D. Epperson Jr
I'm joining this late and may have some of the details incorrect.  But doesn't your client tool have a batch insert object?  If your client is written in either Delphi or .NET, I'm pretty sure it does and that would be the best way to insert bulk records.

Dixon

On Thu, Oct 9, 2014 at 8:18 AM, Doychin Bondzhev doychin@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
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
parameters.

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
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-digest@yahoogroups.com
    firebird-support-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/




--
Dixon Epperson