Introducing MerkleMap, the new library powering Horde's improved performance. Tracking changes with context using Phoenix and Ecto

Preload, or not preload, that is the question

Preload is a part of Ecto.Query module that provides the Query DSL. Preload is a powerful tool that allows you to avoid N+1 queries from negatively affecting our performance. We must explicitly preload the data that we are accessing for an association between data. However, it’s easy to make mistakes when using preload. During the article, I will try to answer questions about making a decision on how to use preload.

https://medium.com/@SergeyChechaev/preload-or-not-preload-that-is-the-question-2b706da51cea