News for hackers. Stuff that matters.
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by guappa on Thursday October 05, 2023 @02:22AM (#37775444)
Wow, that sounds incredibly inefficient!
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by Animats on Thursday October 05, 2023 @03:23AM (#37775744)
If you're going to run the database in a background process, you may as well run MySQL or one of its derivatives, or Postgres. More concurrency.
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by cvilsmeier on Thursday October 05, 2023 @05:17AM (#37776468)
> you may as well run MySQL

You're right, there are use-cases where SQLite is not appropriate. But nothing beats the ease of installation/backup/maintenance of SQLite compared to server databases like MySQL or Postgres. Another point is development: For unit-tests, I found that initializing a SQLite database for each test-run is much easier (and faster) than having a VM that runs Postgres/MySQL/etc, which I have to spin up and tear down before/after each test run.

Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by sureglymop on Thursday October 05, 2023 @06:29AM (#37776865)
Eh, the backup is a bit of a pain... The sqlite3 tool supports a .backup command but it's basic and can't even write to stdout, only directly to a file. There is an online backup api though but most APIs and libraries built around sqlite don't even acknowledge it, let alone support it. Just copying the sqlite file is of course not a real backup and if done at the wrong time will lead to a corrupted backup.
Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by cvilsmeier on Thursday October 05, 2023 @05:11AM (#37776426)
> Wow, that sounds incredibly inefficient!

That's exactly what I thought, too. But, to my own surprise, it's as fast as CGO solutions, in most cases even faster. You may check here: https://github.com/cvilsmeier/sqinn-go-bench

Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by guappa on Thursday October 05, 2023 @08:21AM (#37777651)
The benchmarks seem to put load on the db but not on the data.

I'd want a benchmark that is just select * from table, where table is a few gigabytes…

Re:Show HN: Sqinn-Go is a Golang library for accessing SQLit... by tgv on Friday October 06, 2023 @01:12PM (#37793371)
As with all things software: you can't eat your cake and have it. This is a compromise which suits many use cases, but not all. I've experimented with the version that was translated from C to go, and it worked fine for me (low intensity service using the db for auth checks and logging). Sqinn-go will probably serve as well.