简体   繁体   中英

Can one run the sqlite .import command from within JDBC?

Trying it gave me a syntax error on the ".".

If not, is there another way of bulk loading data into a sqlite database with similar performance? .import (from the command line) does in under a minute what inserts (wrapped in a transaction) do in over 20 minutes.

I tried using .import after reading Faster bulk inserts in sqlite3? . I've tried all the other suggestions there except for virtual tables.

Thanks!

All the .blah commands are features of the sqlite shell only; they can't be used from JDBC (or any other language embedding either). With a very large data import, it's OK to just run it separately (or in a subprocess, provided the parent is not processing any other transactions at the time).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM