Pragmatic
Pragmatic

Reputation: 3127

Why Azure Documentdb creates index on each path by default

By default, documentdb creates an index on every path in a JSON. If we insert a JSON with twenty key-value pairs, documentdb will create indexes on all of these values. Whereas in SQL server, having twenty indexes on a general table is not desirable (especially on transaction tables).

Upvotes: 1

Views: 307

Answers (1)

Aravind Krishna R.
Aravind Krishna R.

Reputation: 8003

Because DocumentDB is designed for schema and query flexibility. DocumentDB is a NoSQL database that is designed to be write optimized, and uses a combination of log structured storage techniques + IR/inverted index techniques to index all properties with a low compute and storage overhead. You can learn more about how this is possible here: http://www.vldb.org/pvldb/vol8/p1668-shukla.pdf

Upvotes: 2

Related Questions