Ggf. geht das in Firebird mit dem Zugriff auf "externe Tabellen", die man dann mit einem "Insert into select from" ggf. schneller geladen bekommt:

Use the
EXTERNAL FILE option to:


Import data from a flat external file in a known fixed-length format into a new or existing
InterBase table. This allows you to populate an InterBase table with data from an external
source. Many applications allow you to create an external file with fixed-length records.


SELECT from the external file as if it were a standard InterBase table.


Export data from an existing InterBase table to an external file. You can format the data
from the InterBase table into a fixed-length file that another application can use.


Restrictions

The following restrictions apply to using the
EXTERNAL FILE option:


You must create the external file before you try to access the external table inside of the
database.


Each record in the external file must be of fixed length. You cannot put BLOB or array
data into an external file.


When you create the table that will be used to import the external data, you must define
a column to contain the end-of-line (EOL) or new-line character. The size of this column
must be exactly large enough to contain a particular system’s EOL symbol (usually one
or two bytes). For most versions of UNIX, it is 1 byte. For Windows, NT, and NetWare, it
is 2 bytes.


While it is possible to read in numeric data directly from an external table, it is much
easier to read it in as character data, and convert using the
CAST() function.


Data to be treated as VARCHAR in InterBase must be stored in an external file in the
following format:

<2-byte unsigned short><string of character bytes>
where the 2-byte unsigned short indicates the number of bytes in the actual string, and
the string immediately follows. Because it is not readily portable, using
VARCHAR data in
an external file is not recommended.


You can only INSERT into and SELECT from the rows of an external table. You cannot

UPDATE
or DELETE from an external table; if you try to do so, InterBase returns an error
message.


Inserting into and selecting from an external table are not under standard transaction
control because the external file is outside of the database. Therefore, changes are
immediate and permanent—you cannot roll back your changes. If you want your table
to be under transaction control, create another internal InterBase table, and insert the
data from the external table into the internal one.

The following steps describe how to import an external file into an InterBase table:
1. Create an InterBase table that allows you to view the external data. Declare
all columns as
CHAR. The text file containing the data must be on the server.
In the following example, the external file exists on a UNIX system, so the
EOL character is 1 byte.

CREATE TABLE EXT_TBL EXTERNAL FILE 'file.txt'
(FNAME CHAR(10),
LNAME CHAR(20),
HDATE CHAR(8),
NEWLINE CHAR(1));
COMMIT;
2. Create another InterBase table that will eventually be your working table. If
you expect to export data from the internal table back to an external file at a
later time, be sure to create a column to hold the newline. Otherwise, you do
not need to leave room for the newline character. In the following example,
a column for the newline is provided:
CREATE TABLE PEOPLE
(FIRST_NAME CHAR(10),
LAST_NAME CHAR(20),
HIRE_DATE CHAR(8),
NEW_LINE CHAR(1));
COMMIT;
3. Create and populate the external file. You can create the file with a text
editor, or you can create an appropriate file with an application like Paradox
for Windows or dBASE for Windows. If you create the file yourself with a text
editor, make each record the same length, pad the unused characters with
blanks, and insert the EOL character(s) at the end of each record.
Note
The number of characters in the EOL is platform-specific. You need to know how
many characters are contained in your platform’s EOL (typically one or two) in order to
correctly format the columns of the tables and the corresponding records in the external
file. In the following example, the record length is 36 characters. “b” represents a blank
space, and “n” represents the EOL:

123456789012345678901234567890123456
fname.....lname.............hdate..n
CHAPTER 6 WORKING WITH TABLES
110
INTERBASE 6

------------------------------------
RobertbbbbBrickmanbbbbbbbbbb6/12/92n
SambbbbbbbJonesbbbbbbbbbbbb12/13/93n
4. At this point, when you do a
SELECT statement from table EXT_TBL, you will
see the records from the external file:

SELECT FNAME, LNAME, HDATE FROM EXT_TBL;
FNAME LNAME HDATE
======== ================= ===========
Robert Brickman 12-JUN-1992
Sam Jones 13-DEC-1993
5. Insert the data into the destination table.
INSERT INTO PEOPLE SELECT FNAME, LNAME, CAST(HDATE AS DATE),
NEWLINE FROM EXT_TBL;
Now if you
SELECT from PEOPLE, the data from your external table will be there.

SELECT FIRST_NAME, LAST_NAME, HIRE_DATE FROM PEOPLE;
FIRST_NAME LAST_NAME HIRE_DATE
========== =================== ===========
Robert Brickman 12-JUN-1992
Sam Jones 13-DEC-1993
InterBase allows you to store the date as an integer by converting from a CHAR(8) to
DATE using the
CAST() function.