Subject | Re: Bulk inserts in Interbase |
---|---|
Author | spgilmore |
Post date | 2005-01-25T17:33:40Z |
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
I thought that bulk-insert was a common database term. However, my
question seems to be unclear, so I'll clarify.
My background is in MSSQL, where a bulk insert is an actual SQL
statement that you issue. It specifies the location of a "flat file"
(delimited text file) with any number of rows in it. It will then
glue this file into the tables in the RDBMS all at once.
It is easily 100 times faster than individual inserts even with a
datapump. In some cases, 1000 times faster (I've seen up to 20,000
rows / second).
The downside... the file has to be in a location that is accessible
to the server and so cannot easily be used by a remote client. It
also is VERY meticulous. The flatfile must be perfect or the whole
thing fails.
Here's an example of an MSSQL bulk insert (not 100% sure of the
syntax anymore.. it's been a while).
BULK INSERT INTO mytable
FROM 'c:\flatfile.txt'
WITH (
ROWTERMINATOR='\n',
FIELDTERMINATOR='~'
)
<aharrison@i...> wrote:
> spgilmore wrote:Firebird
> >
> >
> > I want to know how to do a bulk-insert in Interbase 6.0 or
> > 1.x.time.
>
> What do you mean by a bulk insert? There are ways of improving
> performance for inserts, but the actual records are stored one at a
>I believe that Milan has answered my question. Thank you.
>
> Regards,
>
>
> Ann
I thought that bulk-insert was a common database term. However, my
question seems to be unclear, so I'll clarify.
My background is in MSSQL, where a bulk insert is an actual SQL
statement that you issue. It specifies the location of a "flat file"
(delimited text file) with any number of rows in it. It will then
glue this file into the tables in the RDBMS all at once.
It is easily 100 times faster than individual inserts even with a
datapump. In some cases, 1000 times faster (I've seen up to 20,000
rows / second).
The downside... the file has to be in a location that is accessible
to the server and so cannot easily be used by a remote client. It
also is VERY meticulous. The flatfile must be perfect or the whole
thing fails.
Here's an example of an MSSQL bulk insert (not 100% sure of the
syntax anymore.. it's been a while).
BULK INSERT INTO mytable
FROM 'c:\flatfile.txt'
WITH (
ROWTERMINATOR='\n',
FIELDTERMINATOR='~'
)