Database
301 results found
-
Extend db.collection.distinct() to work with multiple fields in a compound key
Currently the distinct() command finds the unique set of values for a SINGLE specified field across a collection or view. For example:
db.staff.distinct("last_name" )If there is an index on the lastname field, the DISTINCTSCAN plan can use that index and the operation is very fast.
To find the unique values for a set of more than one fields, the $group aggregation stage has to be used like this:
db.staff.aggregate([
{$group: {id: {FName: "$firstname", LName: "$last_name"}} ]);This operation does not really need the $group functionality, as it is not calculating a sum/min/max/average/etc value using the…
4 votes -
wired
wiredTiger open files usage
Currently WT uses a file per collection and index, leading in some scenarios to extremely high number of open files/dhandles.
Is there any plan to support one file/dhandle per database?
4 votes -
Allow multiple text indexes per collection
MongoDb only allow one text index by collection, in contrast of other index types.
This is a limitation that makes it difficult to develop projects with search functionality, for example, if you want to add a text search for advanced users on all fields and a public search on a subset of fields, there isn't a simple and performant way to solve it.
Many developers end up using other products like elastic search, or creating additional collections and using lookup, or using preg_reg or building smart indexes when the creation of multiple text indexes per collection would allow a quick,…
4 votes -
Ability to enable collection name enforcement
Currently if you perform a find or other operation, and you have a typo in your collection name, the operation will execute successfully and there is no indication that the collection you are operating on doesn't exist. It would be handy if there were some sort of session variable that could be set that tells the engine, to return an error if the collection being operated on does not exist. For example, lets say we have a collection named "myCollection". If I issue a find with a typo in the collection name from the shell like:
db.myCollectio.find();
This will successfully…
4 votes -
Improve the election process to consider node reachability
Consider both new and existing sockets to be utilized in order to make more realistic observations about cluster health during an election to avoid for example DNS related issues which would make a node unreachable for new connections.
4 votes -
Include the _ids of existing documents in BulkWriteResult when performing upserts
When performing a bulk operation, it is possible to obtain the _ids of upserted documents via BulkWriteResult. For example:
db.getCollection("test").find({})
db.test.drop()
var bulk = db.test.initializeUnorderedBulkOp();
bulk.find({name: "huey"}).upsert().updateOne({name: "huey"});
bulk.execute();
```The BulkWriteResult contains the upserted _id:
BulkWriteResult({
"writeErrors" : [ ],
"writeConcernErrors" : [ ],
"nInserted" : 0,
"nUpserted" : 1,
"nMatched" : 0,
"nModified" : 0,
"nRemoved" : 0,
"upserted" : [
{
"index" : 0,
"_id" : ObjectId("5ec77b5cc4a955ce03a4cd2e")
}
]
})However, when a document already exist, the _id is not returned:
db.test.find()
var bulk = db.test.initializeUnorderedBulkOp();
bulk.find({name: "huey"}).upsert().updateOne({name: "huey", outfit: "red"});
bulk.find({name: "luey"}).upsert().updateOne({name: "luey", outfit:…4 votes -
Upgrade Advisor
Similar to Microsoft's SQL Server Upgrade Advisor application, generate a report (from Ops Manager for example) identifying issues to fix before or after an upgrade from one major version to another.
4 votes -
MongoDB 4.2 Distributed Transaction with Arbiter
Hello.
We are preparing to introduce MongoDB 4.2 and expect distributed transaction function.I read document which arbiter don't be member when use distributed transaction.
https://docs.mongodb.com/manual/core/transactions/index.html#arbiters
PSA can do that, but it's weird that it doesn't even work out to PSSA.
It usually operates as a PSS from an operating point of view, but can temporarily become a PSA in the event of equipment problems.
Why should there be no Arbiter in the Shard to use Distributed Transaction?
I can not understand restriction.Can you tell me technical reason for not being able to support Distributed Transaction with Arbiter?
Do…4 votes -
MongoDB should have a database backup system commit base for large self-management databases, like git commit.
There is already a mongodb backup tool mongodump but it is not a good solution for backing up large databases. We thought of making a CMS Platform with mongodb. Billions of websites can be created there. For such a large platform, the mongodump backup tool does not seem sufficient.
We want a solution where Mongodb will manage a different backup directory their data will not be deleted even run the delete command. like blockchain. If we run the delete command it will delete the data from the main database but the secondary backup database will declare it as a delete…
3 votes -
connection
Hi,
it will be greatly appreciated to have an option to control the connections number when choosing an instance.
M30 is just what we need except for the connections number
we have around ~2.5k and max is 3k it would help a lot to have an option to increase just the connections number, so we wont need to move to M403 votes -
user authentication
Hy
It would be extremely useful to be able to create users who can only connect to the database from specific networks or even specific IP addresses, similar to what is possible with MySQL.
For example, using the following commands:
CREATE USER 'user_name'@'10.214.3.0' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON shorturl.* TO 'user_name'@'10.214.3.0';
You can create a user who can access the database only from the network with the IP address 10.214.3.0.
I would like to know if it is possible to achieve similar functionality in mongodb as well. This would be very useful for my purposes, as I want…
3 votes -
Introduce a new field BucketLifeSpan Optional along with Granularity
An enhancement to MongoDB's management of time series collections could involve the introduction of a BucketLifeSpan attribute, in addition to the existing Granularity setting. This new, optional attribute would automate the duration a bucket can remain open, with the condition that Granularity should be less than or equal to BucketLifeSpan.
Consider a use case involving a time series collection for tracking data from 70,000 socket devices daily, with DeviceId as the metafield. Assuming data is organized into daily collections and granularity is set to minutes to optimally fill the buckets unless they reach their size limit.
For a collection named…
3 votes -
support parallel query executions include find(), aggregation()
To use multi-core environment and enhance the query performance w/ a large amount of documents, need a parallel execution.
Sharding or microsharding is not an alternative in this case.3 votes -
Collection which stores last login date_time for the users
Are you please able to store the last login date_time for the users which exist either in admin database or $external database in a collection of admin database of that cluster or opsmanager database which manages the clusters?
I have a requirement at my end - is to find the users who havent logged in for 60 days, , their roles to be revoked. And, ultimately delete the users who dont have any roles attached after a fixed period of time.
I do undertsnad you store the login details in audit logs. But that would be a tedious process at…
3 votes -
add IO throughput related fields to 'serverStatus' output
There is no IO throughput related fields in the result of serverStatus, instead in FTDC this is available in the disk metrics.
Need it inserverStatus
output so that we can monitor it.3 votes -
$merge
Report number of docs matched, merged, skipped, etc. from a $merge stage. Alternatively, return the merged doc results as a pipeline result to pass to additional stages.
3 votes -
Compound clustered index
Now it is possible to create a clustered index for only one field. Since documents can be arranged in ascending order of multiple fields, I see no reason to disallow a clustered index from being a compound.
Expected syntax:
create_collection('testVCFcoll', clusteredIndex={'key': {'_id': 1}, 'unique': True, 'name': ['#CHROM', 'POS']})
3 votes -
Document scoped RBAC - Permission for collection document fields
Roles and accesses can be defined on the basis of collections that define roles for users.
It would be nice if these access permissions could be made within the scope of the fields under the collection and the query results would be returned accordingly.Current:
privileges: [
{ resource: { db: "users", collection: "user" }, actions: [ "find"] },
}
Expected:
{ resource: { db: "users", collection: "user", field: "email" }, actions: [ "find"] },
3 votes -
Progress bar
when upgrading cluster / instance from one instance type to other on shared instance for example from M2 to M5, there should be some sort of progress bar exhibited tracking progress of upgrade
3 votes -
bloom filter index
https://www.percona.com/blog/2019/06/14/bloom-indexes-in-postgresql/
I think having an option to use bloom filter indexes could provide for better performance when compared to compound indexes and eliminate the need for having multiple indexes. It would likely require tuning still, but with very large data sets this could be much less expensive.
3 votes
- Don't see your idea?