Fast Inserts / Batch Inserts
Fast Inserts / Batch Inserts
Is there anyway to speedup inserts?
Re: Fast Inserts / Batch Inserts
If you need to insert great number of records into database the most quickest way is packet insertion of records. Set a query
On execution of this query it will be passed to the server by a single packet.
Also it would help to increase MSConnection.Options.PacketSize.
Code: Select all
SQL.Text :=
'INSERT ...;'#$D#$A +
'INSERT ...;'#$D#$A +
...
Also it would help to increase MSConnection.Options.PacketSize.
Re: Fast Inserts / Batch Inserts
Any measurements of how fast can it be?
Ikar wrote:If you need to insert great number of records into database the most quickest way is packet insertion of records. Set a query
On execution of this query it will be passed to the server by a single packet.Code: Select all
SQL.Text := 'INSERT ...;'#$D#$A + 'INSERT ...;'#$D#$A + ...
Also it would help to increase MSConnection.Options.PacketSize.
Re: Fast Inserts / Batch Inserts
It greatly depends on a lot of parameters. Speed-up can reach tens of times. Speed/Performance will increase with lessening data in the single row.
Packetsize
Thanks for your replies,
Another related question:
What happens if the sql.text size is larger than the packet size?
How can i calculate the actual size of the data being sent to the server?
Another related question:
What happens if the sql.text size is larger than the packet size?
How can i calculate the actual size of the data being sent to the server?
Re: Packetsize
> What happens if the sql.text size is larger than the packet size?
The query will be divided into several packets.
> How can i calculate the actual size of the data being sent to the server?[/
OLE DB and SDAC don't provide this functionality.
The query will be divided into several packets.
> How can i calculate the actual size of the data being sent to the server?[/
OLE DB and SDAC don't provide this functionality.