We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
The most popular SQLite and PostgreSQL database drivers in Go are (roughly) 20-76% slower than alternative Go drivers on insert-heavy benchmarks of mine. So if you are bulk-inserting data with Go (and potentially also bulk-retrieving data with Go), you may want to consider the driver carefully. And you may want to consider avoiding
database/sql
.Some driver authors have noted and benchmarked issues with
database/sql
.So it may be the case that
database/sql
is responsible for some of this overhead. And indeed the variations between drivers in this post will be demonstrated by usingdatabase/sql
and avoiding it. This post won't specifically prove that the variation is due to thedatabase/sql
interface. But that doesn't change the premise.Not covered in this post but something to consider: JetBrains has suggested that other frontends like sqlc, sqlx, and GORM do worse than
database/sql
.This post is built on the workload, environment, libraries, and methodology in my databases-intuition repo on GitHub. See the repo for details that will help you reproduce or correct me.
continue reading on notes.eatonphil.com
โ ๏ธ This post links to an external website. โ ๏ธ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.