Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将数据框插入sqlite表中。数据框包含数千行。我现在正在使用RSQLite包进行数据库操作。为了将数据框插入表中,我正在使用dbWriteTable(conn, name, value, ...)方法。但是重复插入表会使程序变慢。还有其他更好的选择可以将数据框插入到表中吗?谢谢。
sqlite
RSQLite
dbWriteTable(conn, name, value, ...)
如果不使用显式事务,则每个 SQL 语句都会包装到一个自动事务中。在每个事务结束时,数据与磁盘同步。
将所有插入包装到一个事务中。