Comments (1)
(WIP) MONGODB INDEX RESEARCH
Indexes are special data structures that store a small portion of the collection's data set in an easy to traverse form. The index stores the value of a specific field or set of fields, ordered by the value of the field.
Default _id index
MongoDB creates a unique index on the _id field during the creation of a collection. The _id index prevents clients from inserting two documents with the same value for the _id field. You cannot drop this index on the _id field.
Single Field
User-defined ascending/descending indexes on a single field of a document.
Compound Index
User-defined indexes on multiple fields, the order of the indexed fields has a strong impact on the effectiveness of a particular index for a given query.
More info:
Compound Indexes
Limitations
- Order can have a strong impact on the query
Multikey Index
MongoDB uses multikey indexes to index the content stored in arrays. If you index a field that holds an array value, MongoDB creates separate index entries for every element of the array
More info:
Multikey Indexes
Limitations
- Can increase the index size
- Index can not contain multiple arrays
Geospacial Index
More info:
Text indexes
MongoDB provides a text index type that supports searching for string content in a collection. These text indexes do not store language-specific stop words (e.g. "the", "a", "or") and stem the words in a collection to only store root words.
More info:
Text Indexes
Limitations
- Need more parameters in query, like the query score to retrieve meaningful data
- Can increase the index size, due to big texts
- More time to create indexes
- Impacts write performance
Clustered Indexes
Starting in MongoDB 5.3, you can create a collection with a clustered index. Collections created with a clustered index are called clustered collections.
More info:
Clustered Collections,
clusteredIndex
Limitations
By default, if a secondary index exists on a clustered collection and the secondary index is usable by your query, the secondary index is selected instead of the clustered index.
WildCard Indexes
MongoDB supports creating indexes on a field or set of fields to support queries. Since MongoDB supports dynamic schemas, applications can query against fields whose names cannot be known in advance or are arbitrary.
To index the value of all fields in a document (excluding _id), specify "$**" as the index key:
db.collection.createIndex( { "$**" : 1 } )
More info:
Limitations
- Requires Version 4.2
- Increases the size of the indexes for large databases
- Can not shard widcard indexes
Partial Indexes
Partial indexes only index the documents in a collection that meet a specified filter expression. By indexing a subset of the documents in a collection, partial indexes have lower storage requirements and reduced performance costs for index creation and maintenance.
More info:
Partial Indexes
References
MongoDB's indexes documentation
How MongoDB Clustered Collection Can Boost Query Performance
from das.
Related Issues (20)
- Improve development automated CI/CD pipelines
- Enhance AtomDB primitives related to MongoDB
- Make a presentation with description of our CI/CD process
- Review release process HOT 1
- Separate Tests and Lint into Individual jobs on pipeline
- failed unit test HOT 4
- Sort lists and sections of release notes in order to show more important topics first
- Error message is wrong when user try to use a python version below 3.10 HOT 1
- Issue loading a local DAS HOT 1
- integration test failure HOT 2
- Connecting to server error HOT 18
- Create POC for new service
- Update the developer guidelines
- DAS API page is broken HOT 2
- Add a section with links for DAS-related presentation and other public articles/documents
- Add CI/CD pipelines to versioning and setup of AttentionBroker server
- Integration of CacheController and AttentionBroker with query engines
- Add a Homeostatic Controller to the architecture
- Make sure all repos are using the same lint config
- Apply linter configuration and poetry to das/python/commons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from das.