SQLite and the N+1 (no) problem

preview_player
Показать описание
Most databases are susceptible to the N+1 problem, with the exception of embedded databases like SQLite. If you're curious why SQLite doesn't suffer from the N+1 problem, watch this video and learn why.

Рекомендации по теме
Комментарии
Автор

Great video! Thanks for explaining the difference. It's unreasonable for this to have only 97 views! Subscribed.

philipptanlak
Автор

How do I find more local-first architecture content like this? This is exactly what I am looking for!

christianlessard
Автор

Great video, I appreciate the comparison at the end, because I kept wondering about the optimized postgres version. Did you use connection pooling for the three queries?

HVossi
Автор

Complex query are still worth it even if there is no network latency. If we don't do join they we have to write code for doing this and it would become more error prone and complex code where as a single query could have done it.

Until there is some memory concern, I don't see a point why not to have complex query for sqlite.

Graveness
Автор

you are using second timing for comparison, but I think that's not right, first query directly goes and fetches data from disk, second query is. misleading and fast because first slow query was cached...

sekomer