Skip to main content

What are hidden indexes and when should you use them?

Senior MongoDB
Quick Answer Hidden indexes are maintained but not used by the query planner. You can hide an index to test the performance impact of removing it without actually dropping it. If queries stay fast, the index was unused and you can safely drop it. If performance degrades, unhide it. Introduced in MongoDB 4.4 to safely evaluate index removal in production.

Answer

Hidden indexes allow evaluating the impact of index removal without affecting the planner, useful for safe index tuning.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice