v1.10

Document

How to Start SequoiaDB

Basic Operation

Data Model

Database Management

Aggregation

Index

Replication

Cluster

Connector

Reference

Development

Release Note

FAQ

  • Content
  • Comments
  • History

Sharding Key Index

Concept

There is a default index named "$shard" in every sharded collection. This is sharding index.

Only sharded collections have sharding index.

Sharding index exists in every sharding group in a sharded collection. The order of field definations and the order of fields are the same as that of sharding key.

Note:

Any unique index defined by user should contain all the fields in sharding index. But the order of fields of them may not be the same.

In sharded collection, the field of "_id" is unique in the sharding, but not globally unique.

Sample

A typical sharding index is as follow:

  { 
        "IndexDef" : { 
           "name" : "$shard", 
           "_id" : { "$oid" : "515954bfa88873112fa6bd3a" }, 
           "key" : { "Field1" : 1, "Field2" : -1 }, 
           "v" : 0, 
           "unique" : false, 
           "dropDups" : false, 
           "enforced" : false 
        }, 
        "IndexFlag" : "Normal" 
  }
please login to comment.
Latest Comment
  • 2015-02-15

About Us

SequoiaDB is a financial-level distributed database vendor and is the first Chinese database listed in Gartner’s Magic Quadrant OPDBMS report. SequoiaDB has recently released version 3.0.
SequoiaDB is now penetrating the vertical sector Financial Industry quickly and had more than 50 banking clients and hundreds of enterprise customers in industries including government, telecommunication, Internet and IoT.

Beijing:
Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
Guangzhou:
Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
Shenzhen:
Tsing Hua Tech Park, Nanshan District, Shenzhen,China
Tel:400-8038-339
E-mail:contact@sequoiadb.com