Dear all,

> You can use a system call to execute a command like the following;
>
> sqlite3 -separator , test.db ".import test.csv sometable"

I do something very similar to this from a Perl application for speed.
It's about twice as fast as doing this from DBI. (Benchmarked on very
large files).

I even ended up extending shell.c to import using REs as separators by
writing a call to Perl from within shell.c that used split.

URrururhg! Perl -> C -> Perl (and the Perl API from C isn't all that
programmer-friendly...)

Still, it worked, but it's no faster at that point than the DBI code in
Perl (actually slower).

So, for simple imports, I continue to use a system call from Perl to do
what has been suggested. For RE imports, I just do those from Perl via
DBI. I suspect you could in Ruby too.

Kind regards

Derek Jones.


Reply via email to