Official Phoenix Guide - too many DB queries?

When I finished up the Phoenix guide through the context section, I was surprised to see that for one request to GET /cms/pages/1 there are 9 queries to the database. Is that normal? Efficient? Not a big concern?

Not a big concern–these guides are optimized for ease of comprehension, not necessarily query volume/performance.

Ecto has a rich preload feature used to reduce this sort of query volume when (and if) it becomes a performance bottleneck.

3 Likes