5 ms·
TLDR to get better performance, use bulk inserts instead of inserting one row per query. And (unrelated to DB perf) don't use the spread operator in JS for pass
by throwaway143829 2y ago
TLDR to get better performance, use bulk inserts instead of inserting one row per query. And (unrelated to DB perf) don't use the spread operator in JS for passing function args (the author says not to use the spread operator at all but you don't need to go that far)
- ak39 2y agoThank you. Also, what database was in use?
- dopp0 2y agosqlite
- throwaway143829 2y agosqlite3, but I think bulk inserts would improve perf for other DBs too.
- kikimora 2y agoPG has “copy” which would blow away bulk inserts. Other DB vendors have similar stuff for high-performance inserts. You would be much better off using those than using bulk inserts.