[DOCS-247] Changing Shard Key Index; shard key index can be a compound index using the shard key as the prefix Created: 21/Jun/12  Updated: 30/Oct/23  Resolved: 25/Jun/12

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

Type: Task Priority: Major - P3
Reporter: Kevin Matulef Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

2.2


Issue Links:
Related
is related to SERVER-1506 when sharding on a and need an index ... Closed
Participants:
Days since reply: 11 years, 34 weeks, 2 days ago

 Description   

All versions:

  • you need to have an index on the shard key if the collection has data.
  • the collection doesn't have data, then shardcollection creates the index.

For 2.2:

  • SERVER-1506, if you have an a,b index then your shard key can be a.
  • if you have an index on a, you can create an index on a,b and then drop index on a.
  • at any given time you must have one index that contains the shard key as a prefix.
    (Can't be a multi-key index.)


 Comments   
Comment by auto [ 25/Jun/12 ]

Author:

{u'date': u'2012-06-25T14:40:14-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-247: corrections in response to technical review
Branch: master
https://github.com/mongodb/docs/commit/1e30060fbc37609bef0b40175514a1c1a7afb0a1

Comment by auto [ 25/Jun/12 ]

Author:

{u'date': u'2012-06-22T13:13:57-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-247 draft of modifiable shard key index section
Branch: master
https://github.com/mongodb/docs/commit/7c43217848ca2eb67534f6c120a950765195959a

Comment by Sam Kleinman (Inactive) [ 22/Jun/12 ]

submitted the following commit for technical review.

https://github.com/tychoish/mongodb-docs/commit/5e3efd4858794de444568db587bd4f7eb7d2bdd2

still need to:

  • cross reference in appropriate tutorials.
  • consider moving section to the administration guide.
Generated at Thu Feb 08 07:38:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.