Solving the Mystery of Index Use

preview_player
Показать описание

If your application is slow there is a good chance that you should look at your indexes but what are indexes? How do they work? When should you use them? In this practical talk filled with real life examples we'll take a look at different types of indexes MongoDB supports and when and how to use them.

In this MongoDB video, we'll explore the intricacies of indexes, debunking common myths and clarifying how they truly function within the database. You'll learn about regular, compound, wildcard, and partial indexes, how they work, and when they should be used. You'll learn about rules of thumb for indexes and when not to apply such rules. We'll delve into the specifics of index types, their roles in optimizing queries, and the trade-offs involved in their implementation. This session promises to be a deep dive into the world of MongoDB indexes, offering valuable insights for developers looking to enhance database performance and efficiency.

📚 RESOURCES 📚

⏱️ Timestamps ⏱️
Introduction to Indexes [00:00:00 - 00:05:11]
Asya Kamsky introduces the topic of indexes, clarifying that the talk will focus on demystifying common misconceptions about how indexes work in databases. The goal is to eliminate myths and provide a clear understanding of indexes to improve their usage in various scenarios.

What Indexes Are Not [00:05:11 - 00:10:22]
Asya explains what the talk will not cover, such as finding problematic queries or reading explain plans. Instead, the focus is strictly on the nature of indexes, their functionality, and common misunderstandings.

The Power of Indexes [00:10:22 - 00:15:33]
The importance of indexes is discussed, including how they can optimize query performance by avoiding full collection scans. Asya uses an analogy of packing boxes to illustrate the concept of doing work upfront (indexing) versus later (searching).

Understanding B-Trees and Index Types [00:15:33 - 00:20:44]
Asya dives into the technical aspects of B-tree data structures used in indexes and debunks myths about what the 'B' stands for. Various index types, such as compound and partial indexes, are also introduced.

Indexing Strategies and Cardinality [00:20:44 - 00:25:55]
The discussion shifts to strategies for creating compound indexes, the role of cardinality in indexing, and the myth that low cardinality fields should not be indexed. Asya emphasizes the importance of query selectivity over field cardinality.

Advanced Indexing Concepts and Conclusion [00:25:55 - 00:31:07]
Asya covers advanced indexing concepts, including partial and wildcard indexes, and touches on the limitations of multikey indexes. The talk concludes with a reminder to use indexes judiciously, considering both their benefits and costs. The speaker encourages feedback and ends the session.

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

need to watch this one again.. wasn't easy

danielschwartz