---
title: "Discussion on \"System slows down with N + 1 queries\" | Hashnode"
description: "Discussion on \"System slows down with N + 1 queries\". Improve performance database with N+1 problems"
url: "https://hashnode.com/posts/system-slows-down-with-n-1-queries/621ce55d085330c3f79c6254"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [System slows down with N + 1 queries](https://quangle.hashnode.dev/system-slows-down-with-n-1-queries?utm_source=hashnode&utm_medium=feed)

Improve performance database with N+1 problems

Feb 28, 2022 · 3 min read · quangle.hashnode.dev  
Read the article

-   [#databases](https://hashnode.com/tag/databases)
-   [#postgresql](https://hashnode.com/tag/postgresql)

## Written by

[lequocduyquang](https://hashnode.com/@quangle)

@quangle · Sai Gon, VN

  
[View profile](https://hashnode.com/@quangle)

Share more, learn more

@SWE

## Responses 1

Markdown supported · ⌘↵ to post

[Elvis Van](https://hashnode.com/@elvisvan)

[Jun 25, 2023](https://hashnode.com/posts/system-slows-down-with-n-1-queries/621ce55d085330c3f79c6254/comment/6497ec2bee8fae5a272d9b43)

an analogy: you need to gather all keys you have, you know the keys are in your house but don't know exactly where each and every one of them at;

you have 2 ways to find them, 1st is to search every single corner in and out manually by your hands&eyes until you found all of the keys, 2nd is to use a special device that can identify key objects and locate the exact positions of every key;

keys = comments

house = postIds

1st way = select from where

2nd way = select from where in

would you say this analogy matches what you want to express?
