3 ms·
What a bizarre use case. I highly doubt your scheme performs better than just using PREPARE AS INSERT to create a prepared statement and execution plan on the d
by NavinF 4y ago
What a bizarre use case. I highly doubt your scheme performs better than just using PREPARE AS INSERT to create a prepared statement and execution plan on the database side. Or are we still generating SQL using string interpolation in 2022?
- ipaddr 4y agoMost people have an orm between them and the database. Think bulk inserting into via the command why the format exists vs what you do in your language and/or framework.
- NavinF 4y agoIf you call row.save() on one ORM object at a time, you'll get neither the performance benefits of prepared statements nor that of multi-row inserts. If you save many objects at a time, the ORM library will use prepared statements.
- regularfry 4y agoWe're certainly still slurping up bulk SQL commands from raw text files in 2022. Kinda odd not to come across that use case.
- Shorel 4y agoI think it is pretty standard usage for ETL tools. You are not inserting a few dozen records, you are inserting a several thousand records each query. In fact, sometimes insert speed is measured in MB per second, not records per second.