Subject Re: [firebird-support] External Tables
Author Aage Johansen
hardygps wrote:
> I'm trying to load some fairly large tables. The process will be run
> daily for quite a few tables. Run time is important. In order to
> minimize run time, the external tables are defined with smallint,
> integer, bigint and decimal columns. This reduces the time it takes
> to create the external tables and presumably the time it will take
> Firebird to insert the data from these tables into corresponding
> internal tables.
> I'd appreciate if you could point me to any documentation on defining
> external tables with these column types as well as columns defined as
> date.
> Here are some specific questions:
> 1. What are the alignment requirements for date, decimal, smallint,
> bigint, integer and char data items?
> 2. How must a decimal(x, y) field appear in the external table?
> 3. How must a date field appear in the external table?
> 4. How must a time field appear in the external table?
> 5. Is there a limit on the number of columns in an external table?
> 6. Is there documentation on external tables that answer any of these
> questions?

Ann has given a comprehensive answer, but: it is easier to use
fixed-size strings - char(x) in the external table.
. It will be easier to verify the table (just by looking at it)
. The table will be larger
. The conversion will need more CPU-time (casting from char(x) to
appropriate type)
I wonder if the additional cpu-time (reading a larger file plus
conversion) will take significantly more "real" time. Did you test
the "simple" approach, and found it not-good-enough?

Aage J.