---
title: "Comment by Adam Lewis on \"EF Core N+1 Queries: Why Your API Gets Slower as Data Grows\" | Hashnode"
description: "The N+1 problem also hides from a code review because the query that multiplies is rarely the one you are looking at. It comes from lazy loading being on by def"
url: "https://hashnode.com/posts/ef-core-n-1-queries-why-your-api-gets-slower-as-data-grows/6aa933e83deba08c2d56eb35/comment/6ab240198766389c2438c64a"
---

[Discussion](https://hashnode.com/posts/ef-core-n-1-queries-why-your-api-gets-slower-as-data-grows/6aa933e83deba08c2d56eb35)

Comment [EF Core N+1 Queries: Why Your API Gets Slower as Data Grows](https://hashnode.com/posts/ef-core-n-1-queries-why-your-api-gets-slower-as-data-grows/6aa933e83deba08c2d56eb35)

[Adam Lewis](https://hashnode.com/@nark3d)

[Sep 22](https://hashnode.com/posts/ef-core-n-1-queries-why-your-api-gets-slower-as-data-grows/6aa933e83deba08c2d56eb35/comment/6ab240198766389c2438c64a)

The N+1 problem also hides from a code review because the query that multiplies is rarely the one you are looking at. It comes from lazy loading being on by default, so a navigation property gets touched inside a loop or a serialiser walks a graph you did not know was there. Turning lazy loading off and projecting with Select is hard, and honestly it is the only way I have found to keep this from creeping back in. The functional tests pass either way, which is why this one tends to reach production before anyone notices.

[Converge Solution](https://hashnode.com/@convergesolution)

[Sep 22](https://hashnode.com/posts/ef-core-n-1-queries-why-your-api-gets-slower-as-data-grows/6aa933e83deba08c2d56eb35/comment/6ab240198766389c2438c64a#reply-6ab255771e2f988e1602450e)

Thanks for sharing this!
