Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1646

Need a better explanation on Synthetic Key

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • mongodb-2.4
    • manual
    • None

    Description

      http://docs.mongodb.org/manual/use-cases/storing-log-data/

      Shard by Combine a Natural and Synthetic Key
      MongoDB supports compound shard keys that combine the best aspects of sharding by a evenly distributed key in the set and sharding by a random key. In these situations, the shard key would resemble

      { path: 1 , ssk: 1 }

      where, path is an often used “natural key, or value from your data and ssk is a hash of the _id field.

      how can we generate a ssk during insert ?

      Attachments

        Activity

          People

            michael.paik Michael Paik
            hari Hari
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 29 weeks ago