tokio-rs / rdbc

Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable Performant Batch Inserts

jonathanvx opened this issue · comments

Converts many single INSERT statements into one INSERT statement with many values.

Example: INSERT INTO table VALUES (1,'yes'),(2,'no),(3,'maybe'),(4,'not sure')

https://dzone.com/articles/performant-batch-inserts-using-jdbc

https://www.journaldev.com/2494/jdbc-batch-insert-update-mysql-oracle

Unless Tiberius (MS-SQL) driver adds native suppurt for batch inserts, I’ve found this method extremely useful to avoid beeing limited to 1000 inserts (which is the case of using INSERT VALUES (), () ...) steffengy/tiberius#93 (comment)

Just posting it here for future reference. Tiberius support needs to be implemented first.

I'd love to see support for BULK INSERT, is that the 'batch insert' you're talking about?