Why Azure Documentdb creates index on each path by default

假装没事ソ 提交于 2019-12-24 10:48:16

问题


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).

  • So why documentdb does this?
  • Is it because it works on most of the scenarios in documentdb? If So, why?

回答1:


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



来源:https://stackoverflow.com/questions/42737508/why-azure-documentdb-creates-index-on-each-path-by-default

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!