[SERVER-14569] RecordStore as clustered index Created: 15/Jul/14  Updated: 06/Dec/22  Resolved: 08/Jun/22

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 5.3.0

Type: Improvement Priority: Major - P3
Reporter: Igor Canadi Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Participants:

 Description   

RecordStore in pluggable engine API is a mapping from DiskLoc to a BSON document. It might be better to make it a mapping from primary key to document. That way, queries that use primary key index will only need to do one read instead of two.



 Comments   
Comment by Louis Williams [ 08/Jun/22 ]

This was released as a feature in MongoDB 5.3. See Clustered Collections.

Comment by Eric Milkie [ 13/Dec/19 ]

That's correct. We're hoping it could be a big win for some write heavy workloads, but for ones with large _id key sizes the tradeoff is that all secondary indexes might start consuming a lot more space.

Comment by Mark Callaghan [ 13/Dec/19 ]

I assume that fixing this will also make it possible for queries with _id:1 to be index-only (covering). I assume that fixing this will be a big win for performance for write-heavy queries given the maintenance cost of the extra index today. My experience with it from years ago is at http://smalldatum.blogspot.com/2015/07/linkbench-for-mysql-mongodb-with-cached.html

Comment by Geert Bosch [ 14/Nov/18 ]

See also this discussion: https://groups.google.com/forum/#!topic/mongodb-dev/8dhOvNx9mBY

Generated at Thu Feb 08 03:35:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.