NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
SQLite vs. PostgreSQL Performance [video] (youtube.com)
adontz 4 days ago [-]
Great video.

I suspect CPU spikes are caused by Go's GC, not some Postgres client issue. Anton got similar latency spikes in nginx vs Caddy test, explained them by GC then.

While settings in the video make sense for production, worth noting that SQLite WAL settings can affect performance by an order of magnitude, so YMMV. Also, SQLite may be completely in memory.

nisegami 4 days ago [-]
I have about a week to choose between SQLite, PostgreSQL or I guess MariaDB for an API using EF Core that should quickly ramp from 0 to ~1k daily active users then slowly ramp to 4-6k DAU over the next year. I feel so in over my head.
anotherhue 4 days ago [-]
Use a managed Postgres and spend your time on un-solved problems.
kbolino 3 days ago [-]
I don't understand how SQLite ends up in the same category for comparison with database servers with this sort of use in mind. SQLite is a great piece of technology but a local file and a network connection are not interchangeable (NFS notwithstanding). How do you deploy an updated version or another instance of your API server while your SQLite file is busy on another machine?
5Qn8mNbc2FNCiVV 3 days ago [-]
Just use Postgres. Sqlite migrations are a PITA
leosanchez 4 days ago [-]
I don't know if it helps but EFCore support for Postgres is excellent :).

But sqlite should handle 1k DAU.

yread 4 days ago [-]
You need to look at other things apart from DAU, too. How many writes, how complicated is the database (number of tables, average number of joins to answer a query), what are the availability requirements? And how far can you go with having the db on the same machine: how much can you scale vertically, what's the fastest storage you can get?
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 01:33:51 GMT+0000 (Coordinated Universal Time) with Vercel.