1

i want shard a collection and this collection must have no any index (for fast insert operation). i create collection with autoIndexId : false and shard it, but when shard it, the mongo create index on shard key. Now, Can I have a shard collection without any index ?

Hamid Mamdoohi
  • 134
  • 1
  • 9

1 Answers1

2

No, a shard collections allways needs an index that cannot be changed afterwards. This Index is needed to the distribution across multiple clusters.

http://docs.mongodb.org/manual/core/sharding-shard-key/

Simulant
  • 19,190
  • 8
  • 63
  • 98
  • So, How to increase speed of write operation. i use mongoimport to import data from file to database, max speed of write is 1500 per second, but i want increase it to 100K per second – Hamid Mamdoohi Mar 03 '15 at 10:42
  • you could change the journal settings: http://docs.mongodb.org/manual/core/write-performance/ – Simulant Mar 03 '15 at 14:47