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.
我使用 OLEDB 将数据插入到 DB4 .dbf 文件中。插入 5,500 行大约需要 2.5 分钟。所以我需要一种更快的方法来实现它,因为我的数据将有多达 80,000 行,而且花费的时间太痛苦了。有没有其他更快的方法可以做到这一点?根据您的看法,哪种方式最好?
PS:请提及aprox。如果可能,您的方法所花费的时间
在单个查询中插入多行可以大大加快您的工作。 例如:我刚刚尝试使用 100,000 INSERT 插入 100,000 行并使用 1,000 INSERT,每行 100 行:我的速度提高了大约 100! 区别在于使用
INSERT INTO table (....) VALUES (...)
和
INSERT INTO table (....) VALUES (...),(...),(...),(...),(...),...
因此,编辑您的插入函数以一次使用 100 条(例如)记录。