Why is SQLite so good at handling 'large numbers of small queries'?
Many Small Queries Are Efficient In SQLite
https://sqlite.org/np1queryprob.html
According to the
SQLite responded to the developer's point that ''200 queries per page' is a problem for client-server databases such as MySQL and PostgreSQL, where applications and databases run separately.' .. In a client-server database, communication between the application and the database causes a problem called the ' N + 1 problem ', where 'executing a large number of queries takes a very long time'. In general, you can use JOIN clauses to join tables or Eager loading to preload data to avoid N + 1 problems.
Unlike the client-server database that has the N + 1 problem, SQLite has a structure in which the application reads and writes files directly, so even if a large number of queries are executed, a bottleneck due to communication does not occur. The version control system '
The disadvantage of SQLite is that it cannot be replicated, but there are also projects that realize SQLite replication using Amazon S3 .
The reason why 'Litestream' was born to simplify 'too complicated server configuration' to the origin --GIGAZINE
Related Posts:
in Software, Posted by darkhorse_log