DEV Community

Cover image for SQLite vs PostgreSQL
Max Bantsevich for dev.family

Posted on

3 2

SQLite vs PostgreSQL

😲Suddenly, we’ve discovered that SQLite works much faster in some situations than PostgreSQL.

We tried to compare the speed of SQLite and PostgreSQL during the simplest operations of inserting, updating and extracting data from a spreadsheet.

You should know that SQLite is a single file, while PostgreSQL is a whole server with many additional functions.
As we can see, the speed of SQLite due to its simplicity significantly exceeds PostgreSQL. For example:

  • The insertion speed is 10 times higher.
  • The sampling rate turned out to be 30 times higher.
  • The update rate is almost identical to PostgreSQL.

That’s why we can conclude that SQLite will be an excellent choice if you need a database to store a small amount of data and do not need to do complex manipulations.

You can find the results of our tests here https://github.com/dev-family/sqlite-bench

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay