[fpc-pascal] Firebird: bulk insert performance: suggestions?

Reinier Olislagers reinierolislagers at gmail.com
Sat Sep 8 11:47:52 CEST 2012


On 8-9-2012 11:04, patspiper wrote:
> On 07/09/12 14:03, Reinier Olislagers wrote:
> - Turning Forced Writes off while doing the bulk inserts may help (at a
> higher risk). But make sure you turn it back on afterwards.
> 
> - If my memory serves well, the Firebird SP can directly read from the
> CSV file instead of going through sqldb for each and every record.
> 
> Stephano

Thanks, Stephano!
1. Yep, forced writes could indeed be a good one (surely for the first
phase: putting everything in the temporary table).
2. It can't read from CSV - but can read from fixed width text files.
The problem is that it gets very complicated, (AFAIU) impossible if you
have UTF8 data in there.
Of course, currently I'm reading ANSI and converting to UF8 myself; the
db can probably do that too.
I'll keep this option in mind - however I'd also like to support
client/server systems in future so that's why I haven't looked at this
further.

Thanks,
Reinier



More information about the fpc-pascal mailing list