Subject Re: [ib-support] Is There A Fast Load Utility Or API?
Author Martijn Tonies
Hi Mark,

> > > I have a file of several million records in csv style format. Is
> > there a
> > > utility or api that will let me load these efficiently? By
> > efficiently I
> > > mean faster than reading the file and calling EXEC SQL INSERT for each
> > > record.....
> >
> > Use prepared statements - that's a lot faster.
>
> Oh dear - I was hopping for orders of magnitude better than individual
> inserts (prepared or not), something like Db2's LOAD or Postgresql's
> COPY that bypasses the sql layer...so does Firebird have no "bulk load"
> api at all? (or am I just looking at this the wrong way...?)

Only the fixed-length "external file" tables. These are the fastests and
beat any INSERT like thingy to it.

> > If you like, you can try Database Workbench and the CSV import -
> > see www.upscene.com for a trial download.
> >
> >
> (apologies if this is a FAQ) - Is this tool a wrapper for inidividual
> inserts (prepared or not) or does it use some "low level" access to a
> database?

This uses prepared inserts. Like any import tool, except external tables.


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com