Cosmos DB API性能比较

时间:2018-06-19 07:57:10

标签: azure cassandra azure-cosmosdb

我开始研究Azure Cosmos DB并发现Cassandra API尚未在GA中使用。虽然我一般对Cassandra API感兴趣,但我也想弄清楚Cosmos DB是如何工作的,所以我可以找到一种方法来如何根据我的需要使用现有的API。

我从官方文档中了解到:

  • 无论使用何种API(MongoDB,Cassandra等),Cosmos DB都以相同的方式存储数据
  • Cosmos DB自动索引所有属性

这是否意味着我可以使用任何其他API(例如MongoDB,SQL等)并期望与我使用Cassandra API时的性能相似?

1 个答案:

答案 0 :(得分:0)

  
    

无论使用何种API(MongoDB,Cassandra等),Cosmos DB都以相同的方式存储数据

  

使用不同的API时,Cosmos DB以不同的方式存储数据。

  
    

Cosmos DB自动索引所有属性

  

默认情况下,所有Azure Cosmos DB数据都已编制索引。更多信息供您参考:How does Azure Cosmos DB index data

  
    

这是否意味着我可以使用任何其他API(例如MongoDB,SQL等)并期望与我使用Cassandra API时的性能相似?

  

每个API都适用于指定的场景,并且在其合适的场景中具有比其他场景更好的性能。

例如:

If we used to use MongoDB in the past, we can use Mongo API.

If we need to handle our data which is like model or to model both entities and relationships naturally, we can use graph api.

If we need to store data for apps which are written for Apache Cassandra, we can use Apache Cassandra API.
相关问题