MongoDB Compound Index and Indexing

preview_player
Показать описание
Welcome to the MongoDB Video Series and in this video, I'm talking about MongoDB compound indexes. Indexes drastically impacts the performance of MongoDB especially for the search queries and compound indexes plays a significant role in that

This video is explanation by example using MongoDB compass so that everyone can understand the same no matter which programming language they work on.

I've created a very simple mongodb database with just 2 field e.g. name and country and I will show the impact of single and compound indexed on the search query outputs.

I hope and believe that this video will help you to understand the concept and idea behind mongodb compound indexes in a better way

Timecodes
0:00 : MongoDB compound Indexes
0:35 : Mongodb indexes means faster query
1:03 : Compound Indexed in MongoDb
1:31 : A database and compound index
3:35 : Database query in MongoDB compass
4:41 : Creating Indexes in MongoDB compass
5:43 : Sorting query output in MongoDB
6:36 : Creating Compound Indexes in MongoDB Compass
8:30 : Sequence matters in compound indexes

#mongodb #nosql #database

About Me i.e. An Insightful Techie

Greetings and Thanks a lot for checking out my YouTube Channel. I’m Deepak K Gupta (Daksh). This channel is a medium for me to share my learnings and journey as a Techie so that you not only learn from my experience but also from my mistakes

As a techie I am closely associated with software development, so most of my content will revolve around Programming Languages, AI, Machine learning and Databases. I share things which will help you learn, remember and use these things in an effective and efficient way.

As a Techie, I also know that there is a life beyond software development and it has a profound impact on our career as well as on our well being. I also share those learnings which I feel are worth sharing with the intention that it MAY help you in taking better decisions in your life.

Last but not the least, I'm a traveler and explorer by nature. I would like to take you with me on some of the interesting journeys around the world. Believe me there is more to learn outdoors than indoors

Hope you’ll like my contents and will be part of my journey 🙏

Рекомендации по теме
Комментарии
Автор

Sir, thank you for sharing this tutorial video. I need to ask one question -- There is one use case as how to modify index because migrating all data impacts performance. Please suggest some solutions.

komalsingla
Автор

hi, i have a question
how can i used both direction sorting in compound index
for example : i have compound index "active_1_name_1__id_1", name is used for sorting, i want to used name for ascending sorting as well as descending sorting

MahenderPratapSingh-cf
Автор

Great video! Using mongoimport we have a param specifying the numinsertionworker for parallel insertion do we have a similar param in pymongo, if not do you suggest any ways that we could achieve parallel insertion using python?

techshortstamil
Автор

Amazing,
Sir I have a question which is confusing me a lot. I hope you'll fix it for sure...
I have a collection with 30M documents. each document contains 4 keys and 4 values like (Bill_id, Amount, City, Tel).
How should I create indexes ?
Should I use 4(square) indexes? like 36 indexes ?

arbazahmed
Автор

I'm so exited but i still have no idea how to implement it in my code or on my mongodb server through the terminal

Pixelflames
Автор

awesome explanation... can you share the mongodump in the description?

funnyclipz
Автор

is there any video on composite indexing in case size is exceeding

lalitbelwal
Автор

How to specify two custom indexes on two different fields in the compound autocompleted query?

reyanshspeak
Автор

Hello Sir, Is it possible to get indexStats using pymongo?

prasadshivan
Автор

Most of the time 'FETCH' step execution time will be ~0. Shouldn't we look at Actual query execution time to see performance benefit after applying the indexes ?

thirumurugand
Автор

Supposed if our document on 10th place they why mongodb search 10000 documents?

iampiyush