|Subject||RE: [IBO] Optimize massive inserts with TClientDataSet + IBO|
> How can I use SP to insert thousands of records? Please give someIt would be helpful to know what database you are using.
> example or clue where to look for the solution. I also have lots od
> inserts and some performance trouble.
InterBase has a new feature that allows batch execution which might be
helpful to increase your performance in this area. I am working on
implementing these capabilities.
If you are using Firebird another way to do batch inserting is to make a
large stored procedure that has 5 (or 10 or whatever) rows worth of input
parameters and then inside the stored procedure make the 5 (or 10 or
whatever) inserts. This way you will get multiple records inserted per each
trip on the wire.
If you are really concerned about performance I suggest you sniff the
network conversation and tune things so that you maximally fill a single
network packet per each iteration so that you have maximum efficiency. You
will be adjusting the number of input parameters to the stored procedure by
adjusting how many rows of data it will take in one shot.
It would be interesting if you shared your benchmarks with us as you tinker
with your situation.