When should I use Sql Azure and when should I use table Storage?

前端 未结 5 1760
攒了一身酷
攒了一身酷 2020-12-07 11:24

When should i use Sql Azure and when should I use table Storage? I was thinking , use table storage for transaction processing scenarios e.g. debit credit accounts kind of

5条回答
  •  心在旅途
    2020-12-07 11:50

    Some of these answers don't seem complete, so I'll add my 2 cents.

    Azure Table's Good points:

    • Strong point is its ability to store lots of little data; Azure table is based on Azure Blob, but is geared towards smaller data
    • Much cheaper than Azure SQL Server
    • Anytime you know both the partition key and the row key, the data access is very fast.
    • Entity transactions are possible if you place two different "schemas" in the same partition key.
    • Where the total row size is LESS THAN 980K (SQL Row)
    • Where each property is LESS THAN 64K (SQL Column)
    • It can act as a poor man's SQL.

    Azure table's bad points:

    • SQL is the weak point. Don't expect to use this on any large SQL table or you will suffer performance issues.
    • Limited SQL is available, don't expect joins of any type, besides what you implement in Linq
    • Azure Table SQL doesn't scale as well as its ability to store an infinite amount of data
    • Anytime you don't specify both a partition key and row key in a WHERE clause, expect a slow table scan to occur
    • Expect table scan performance to degrade as you add more rows
    • Don't expect Azue Table queries to be fast as you add more rows
    • Bottom line, if you're using Azure Table to act like SQL don't add lots of data. If you have lots of data (gigabytes), just don't plan on getting high-performance SQL queries against it. You will be saving money if you don't need those regular SQL features.

提交回复
热议问题