---
title: "Discussion on \"MongoDB Optimization - Indexes and when to use them\" | Hashnode"
description: "Discussion on \"MongoDB Optimization - Indexes and when to use them\". When designing your data models you should always have one important thing in mind: how do I index it ?\nIndexes can make your data consumption faster and easier. A query that will take 2 seconds to complete without an index, can take only a few milli..."
url: "https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164"
---

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

Discussion

# [MongoDB Optimization - Indexes and when to use them](https://almogvc.hashnode.dev/mongodb-optimization-indexes-and-when-to-use-them?utm_source=hashnode&utm_medium=feed)

When designing your data models you should always have one important thing in mind: how do I index it ? Indexes can make your data consumption faster and easier. A query that will take 2 seconds to complete without an index, can take only a few milli...

Jun 11, 2019 · almogvc.hashnode.dev  
Read the article

-   [#mongodb](https://hashnode.com/tag/mongodb)
-   [#optimization](https://hashnode.com/tag/optimization)

## Written by

[Almog Vagman Ciprut](https://hashnode.com/@almogVC)

@almogVC

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

Senior full stack web developer

## Responses 5

Markdown supported · ⌘↵ to post

[Lasha Kakhidze](https://hashnode.com/@kaxi1993)

[Jun 15, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5d04b0c1bca18e1b285e54a2)

So interesting article, thank you ❤️

[Wei Lun](https://hashnode.com/@weilun)

[Jun 11, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5cff7f9756b30c7e2ee06869)

By far the best article on MongoDB indexes, and it is what I was looking for. Thanks!

[Shahar Yair](https://hashnode.com/@shya95)

[Jun 11, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5cff7b9c22f0227b3ecab92c)

Best article I've read in this site so far! It was actually very helpful to me in my current project :)

[xplor4r (Maintainer)](https://hashnode.com/@SujayKundu)

[Jun 11, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5cff7b9c22f0227b3ecab92c#reply-5cffc090f430756176520f83)

Thanks very helpful 😍 keep sharing awesome stuff like this

[Sandeep Panda](https://hashnode.com/@sandeep)

[Jun 11, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5cff730056b30c7e2ee066dd)

This is by far the most comprehensive and well-written article on MongoDB indexes. Loved your article and have bookmarked it. Thanks for the awesome content. 👏

[Gangster](https://hashnode.com/@DixieNormus)

[Jun 11, 2019](https://hashnode.com/posts/mongodb-optimization-indexes-and-when-to-use-them/5cff3a3e426d2cb35f655164/comment/5cff3fb3426d2cb35f655191)

God damn bro that's quite hell of an article... I cried several times reading that! My mon thought I was watching anime but I just read your holy work. I offered your methods to Google and they thanks me so hard that I bought lambo dude. KEEP DOING THAT!
