[DOCS-8699] Composite _id field gotchas Created: 30/Aug/16  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Chris Findlay Assignee: Ravind Kumar (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

I'm trying to find out where there is a discussion about using a document for an _id value.

Specifically, one that lists the gotchas of exact matches requiring equivalent field order, and when the default _id index is and is not used (

{ { _id: { a: 1, b: 2 } }

vs.

{ "_id.a": 1, "_id.b": 2 }

).

We just solved a production performance issue by adding an index on effectively "_id.a" and so I'm trying to find a nice link to add to our required-knowledge list that spells that out. So far the best I have found is:
http://stackoverflow.com/questions/23164417/mongodb-and-composite-primary-keys#answer-23317292
But it doesn't list the reasons why, just the facts.



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 07:56:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.