Comparison between Azure SQL cost vs DocumentDB/CosmosDB cost

情到浓时终转凉″ 提交于 2019-12-11 09:23:57

问题


Did anyone run any comparison between Azure SQL cost vs DocumentDB/CosmosDB cost? The RU that's presented in the Azure CosmosDB cost is not clear to me. E.g., 1 request in 1 TB db cannot be equal with 1 request in 1 GB db.


回答1:


First, you cannot reliably generalize a comparison of cost between relational Azure SQL cost and NoSQL CosmosDB cost, because they are significantly different things. They are not interchangeable, they would require different data modelling depending on planned usage and chosen optimization points. The cost (development + azure bill + future maintenance) can vary a lot depending on your load and usage.

So the general answer is the rather useless "it depends".

See more about sql vs noSQL differences, also some considerations about switching from sql to nosql.

The best way to get a better understanding of what a RU is, is to experiment by generating realistic data and examining realistic queries and deduce target cost from it. If you get your document by id or from a selective-enough index (and you should never scan in docDB), then most likely the RU cost is similar in GB vs TB DB.

If you lack the time to test with realistic data/queries, then you could play with https://www.documentdb.com/capacityplanner .

NB! Please note that both approaches require you already have some idea how you would lay out your data in NoSQL. NoSQL documents are not equivalent to SQL rows -or- tables. See "Modeling Data for NoSQL Document Databases" persentation by Ryan CrawCour, David Makogon for ideas what to consider when designing for noSQL.



来源:https://stackoverflow.com/questions/49485733/comparison-between-azure-sql-cost-vs-documentdb-cosmosdb-cost

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