Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (50.2k points)
In general, I have to create a compound index in the same order as the parameters are being queried. So I want to ask is this order matter performance-wise at all?

1 Answer

0 votes
by (107k points)
edited by

It actually depends on the usage. MongoDB has a lot of options on how you deal with indexes. You can describe compound indexes or single indexes; Mongo can intersect single indexes in other to execute your query. There are other concepts, like an index to cover your query, which has some limitations. So it really depends on each particular query you want to make and their expected document format.

To help you gain a better understanding, here is a Full Stack Developer Certification Course provided by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...