Subject | Re: [firebird-support] Faster insert |
---|---|
Author | Martijn Tonies |
Post date | 2003-11-24T20:05:39Z |
Hi,
taking too long.
Define "long".
rows.
parameters, call Execute, fill parameters ... etc.
if you can deliver a fixed-length ASCII file, take a look at External File
tables.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I need to insert 50.000 rows in a table in the same transaction (thisinsert operation must be atomic, 50.000 or nothing). But this operation is
taking too long.
Define "long".
> I use delphi + midas + ibx to access firebird and probably the midasdataset provider is creating 50.000 inserts instead of 1 insert with 50.000
rows.
> My question is, what is the fastest way to insert these rows:and create some external code to control if all rows was inserted; (ugly)
> 1. kick out midas and create a dml script in runtime;
> 1.1. create a insert statement for each row;
> 1.2. create only a insert statement with lots of lines;
>
> 2. let midas insert the rows, but add a commit(retaining) at each 500 rows
>Prepare an IBX DSQL statement, fill parameters, call Execute, fill
> 3. Any other idea, or solutions that you already use.
parameters, call Execute, fill parameters ... etc.
if you can deliver a fixed-length ASCII file, take a look at External File
tables.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com