3 ms·
Are unique indexes planned for any of the upcoming releases?
by jefficient 12y ago
Are unique indexes planned for any of the upcoming releases?
- coffeemug 12y agoThe primary index for the table is always unique. We do not plan to implement secondary unique indexes. The philosophy behind RethinkDB is that if a feature cannot be efficiently scaled across multiple nodes we don't add it, and unfortunately unique secondary indexes are one such feature. AFAIK most NoSQL databases don't implement it, and a few that do take two approaches -- forbid it on multiple shards, or just take a massive performance hit during sharding. We chose to keep the feature out of the database. This way the application can be architected to account for it, so it remains fast as the database scales up.
- mrkurt 12y agoThis is good, for what it's worth. Having different feature sets for sharded vs unsharded is just utterly confusing, and something MongoDB got really wrong.