在 vCore 和 DTU 購買模型之間做選擇Choose between the vCore and the DTU purchasing models

Azure SQL Database 可讓您輕鬆購買完全受控的平臺即服務 (PaaS) 資料庫引擎, 以符合您的效能和成本需求。Azure SQL Database lets you easily purchase a fully managed platform as a service (PaaS) database engine that fits your performance and cost needs. 視您為 Azure SQL Database 選擇的部署模型而定, 您可以選取適合您的購買模型:Depending on the deployment model you've chosen for Azure SQL Database, you can select the purchasing model that works for you:

  • 虛擬核心 (vCore) 為基礎的購買模型(建議使用)。Virtual core (vCore)-based purchasing model (recommended). 此購買模型可讓您選擇布建的計算層和無伺服器 (預覽) 計算層。This purchasing model provides a choice between a provisioned compute tier and a serverless (preview) compute tier. 在布建的計算層中, 您可以選擇一律針對您的工作負載布建的確切計算資源量。With the provisioned compute tier, you choose the exact amount of compute resources that are always provisioned for your workload. 透過無伺服器計算層, 您可以透過可設定的計算範圍來指定計算資源的自動調整。With the serverless compute tier, you specify the autoscaling of the compute resources over a configurable compute range. 使用此計算層時, 您也可以根據工作負載活動自動暫停和繼續資料庫。With this compute tier, you can also automatically pause and resume the database based on workload activity. 在布建的計算層中, 每個時間單位的 vCore 單位價格低於無伺服器計算層級。The vCore unit price per unit of time is lower in the provisioned compute tier than it is in the serverless compute tier.
  • 資料庫交易單位 (DTU) 為基礎的購買模型Database transaction unit (DTU)-based purchasing model. 此購買模型提供針對一般工作負載平衡的配套計算和儲存體套件。This purchasing model provides bundled compute and storage packages balanced for common workloads.

不同的購買模型適用于不同的 Azure SQL Database 部署模型:Different purchasing models are available for different Azure SQL Database deployment models:

下表和圖表會比較和對比以 vCore 為基礎和以 DTU 為基礎的購買模型:The following table and chart compare and contrast the vCore-based and the DTU-based purchasing models:

購買模型Purchasing model 描述Description 適用對象Best for
以 DTU 為基礎的模型DTU-based model 此模型是以計算、儲存體和 i/o 資源的配套量值為基礎。This model is based on a bundled measure of compute, storage, and I/O resources. 計算大小會以 Dtu 為單一資料庫和彈性資料庫交易單位 (Edtu) 來表示。Compute sizes are expressed in DTUs for single databases and in elastic database transaction units (eDTUs) for elastic pools. 如需 Dtu 和 Edtu 的詳細資訊, 請參閱什麼是 dtu 和 edtu?For more information about DTUs and eDTUs, see What are DTUs and eDTUs?. 適用于需要簡單、預先設定之資源選項的客戶。Best for customers who want simple, preconfigured resource options.
以虛擬核心為基礎的模型vCore-based model 此模型可讓您獨立地選擇計算和儲存體資源。This model allows you to independently choose compute and storage resources. 以虛擬核心為基礎的購買模型也可讓您使用適用於 SQL Server 的 Azure Hybrid Benefit,以節省成本。The vCore-based purchasing model also allows you to use Azure Hybrid Benefit for SQL Server to gain cost savings. 適合重視彈性、控制力和透明度的客戶。Best for customers who value flexibility, control, and transparency.

計價模式比較

計算成本Compute costs

已布建的計算成本Provisioned compute costs

在布建的計算層中, 計算成本會反映為應用程式布建的計算容量總計。In the provisioned compute tier, the compute cost reflects the total compute capacity that is provisioned for the application.

在業務關鍵服務層級中,我們會自動配置至少 3 個複本。In the business critical service tier, we automatically allocate at least 3 replicas. 為了反映這項額外的計算資源配置, 以 vCore 為基礎的購買模型中的價格比一般用途服務層級更高的商務關鍵服務層級中的 2.7 x 以上。To reflect this additional allocation of compute resources, the price in the vCore-based purchasing model is approximately 2.7x higher in the business critical service tier than it is in the general purpose service tier. 同樣地, 商務關鍵服務層級中的每 GB 儲存價格也會反映 SSD 儲存體的高 i/o 和低延遲。Likewise, the higher storage price per GB in the business critical service tier reflects the high I/O and low latency of the SSD storage.

針對業務關鍵服務層級和一般用途服務層級, 備份儲存體的成本相同, 因為這兩個層級都使用標準儲存體。The cost of backup storage is the same for the business critical service tier and the general purpose service tier because both tiers use standard storage.

無伺服器計算成本Serverless compute costs

如需如何定義計算容量和計算無伺服器計算層成本的說明, 請參閱SQL Database 無伺服器 (預覽)For a description of how compute capacity is defined and costs are calculated for the serverless compute tier, see SQL Database serverless (preview).

儲存成本Storage costs

不同類型的儲存體會以不同方式計費。Different types of storage are billed differently. 對於資料儲存體, 會根據您選取的資料庫或集區大小上限來支付已布建儲存體的費用。For data storage, you're charged for the provisioned storage based upon the maximum database or pool size you select. 除非您減少或增加該上限, 否則成本不會變更。The cost doesn't change unless you reduce or increase that maximum. 備份儲存體與您執行個體的自動備份相關聯,而且是動態配置的。Backup storage is associated with automated backups of your instance and is allocated dynamically. 增加您的備份保留期限, 會增加您的實例所耗用的備份儲存體。Increasing your backup-retention period increases the backup storage that’s consumed by your instance.

根據預設, 系統會將您資料庫的7天自動備份複製到讀取權限異地多餘儲存體 (RA-GRS) 標準 Blob 儲存體帳戶。By default, 7 days of automated backups of your databases are copied to a read-access geo-redundant storage (RA-GRS) standard Blob storage account. 每週完整備份、每日差異備份, 以及每5分鐘複製一次的交易記錄備份都使用此儲存體。This storage is used by weekly full backups, daily differential backups, and transaction log backups, which are copied every 5 minutes. 交易記錄檔的大小取決於資料庫的變更率。The size of the transaction logs depends on the rate of change of the database. 最小儲存體金額等於 100% 的資料庫大小, 免費提供。A minimum storage amount equal to 100 percent of the database size is provided at no extra charge. 備份儲存體的額外使用量,會按月以 GB 為單位收費。Additional consumption of backup storage is charged in GB per month.

如需儲存體價格的詳細資訊,請參閱定價頁面。For more information about storage prices, see the pricing page.

以虛擬核心為基礎的購買模型vCore-based purchasing model

虛擬核心 (vCore) 代表邏輯 CPU, 並可讓您選擇硬體的世代和硬體的實體特性 (例如核心數目、記憶體和儲存體大小)。A virtual core (vCore) represents a logical CPU and offers you the option to choose between generations of hardware and the physical characteristics of the hardware (for example, the number of cores, the memory, and the storage size). VCore 為基礎的購買模型可讓您彈性、控制、個別資源耗用量的透明度, 以及直接將內部部署工作負載需求轉譯到雲端的方式。The vCore-based purchasing model gives you flexibility, control, transparency of individual resource consumption, and a straightforward way to translate on-premises workload requirements to the cloud. 此模型可讓您根據您的工作負載需求, 選擇計算、記憶體和儲存體資源。This model allows you to choose compute, memory, and storage resources based upon your workload needs.

在 vCore 為基礎的購買模型中, 您可以選擇單一資料庫彈性集區和受控實例一般用途商務關鍵服務層級。In the vCore-based purchasing model, you can choose between the general purpose and business critical service tiers for single databases, elastic pools, and managed instances. 針對單一資料庫, 您也可以選擇超大規模資料庫服務層級For single databases, you can also choose the hyperscale service tier.

VCore 為基礎的購買模型可讓您獨立選擇計算和儲存體資源、符合內部部署效能, 並將價格優化。The vCore-based purchasing model lets you independently choose compute and storage resources, match on-premises performance, and optimize price. 在 vCore 為基礎的購買模型中, 您需支付下列費用:In the vCore-based purchasing model, you pay for:

  • 計算資源 (服務層級 + 虛擬核心數目和記憶體數量 + 硬體世代)。Compute resources (the service tier + the number of vCores and the amount of memory + the generation of hardware).
  • 資料和記錄儲存體的類型和數量。The type and amount of data and log storage.
  • 備份儲存體 (RA-GRS)。Backup storage (RA-GRS).

重要

計算資源、i/o 和資料和記錄儲存體會依資料庫或彈性集區收費。Compute resources, I/O, and data and log storage are charged per database or elastic pool. 備份儲存體是依每個資料庫收費。Backup storage is charged per each database. 如需受控執行個體費用的詳細資訊,請參閱受控執行個體For more information about managed instance charges, see managed instances. 區域限制: 如需目前支援的區域清單,請參閱依區域提供的產品Region limitations: For the current list of supported regions, see products available by region. 若要在目前不支援的區域中建立受控實例, 請透過Azure 入口網站傳送支援要求To create a managed instance in a region that currently isn't supported, send a support request via the Azure portal.

如果您的單一資料庫或彈性集區耗用300個以上的 Dtu, 轉換成以 vCore 為基礎的購買模型可能會降低成本。If your single database or elastic pool consumes more than 300 DTUs, converting to the vCore-based purchasing model might reduce your costs. 您可以使用您選擇的 API 或使用 Azure 入口網站, 而不需要停機來進行轉換。You can convert by using your API of choice or by using the Azure portal, with no downtime. 不過, 不需要轉換, 也不會自動完成。However, conversion isn't required and isn't done automatically. 如果以 DTU 為基礎的購買模型符合您的效能和商務需求,請繼續使用即可。If the DTU-based purchasing model meets your performance and business requirements, you should continue using it.

若要從以 DTU 為基礎的購買模型轉換成 vCore 為基礎的購買模型, 請使用下列經驗法則選取計算大小:To convert from the DTU-based purchasing model to the vCore-based purchasing model, select the compute size by using the following rules of thumb:

  • 標準層中的每個 100 Dtu 在一般用途服務層級中至少需要1個 vCore。Every 100 DTUs in the standard tier require at least 1 vCore in the general purpose service tier.
  • 進階層中的每個 125 Dtu 在業務關鍵服務層中至少需要1個 vCore。Every 125 DTUs in the premium tier require at least 1 vCore in the business critical service tier.

以 DTU 為基礎的購買模型DTU-based purchasing model

資料庫交易單位 (DTU) 代表 CPU、記憶體、讀取和寫入的混合量值。A database transaction unit (DTU) represents a blended measure of CPU, memory, reads, and writes. 以 DTU 為基礎的購買模型會提供一組預先設定好的計算資源組合和所包含的儲存體,以期達成不同的應用程式效能等級。The DTU-based purchasing model offers a set of preconfigured bundles of compute resources and included storage to drive different levels of application performance. 如果您偏好預先設定的配套和每月固定款項的簡單性, 以 DTU 為基礎的模型可能更適合您的需求。If you prefer the simplicity of a preconfigured bundle and fixed payments each month, the DTU-based model might be more suitable for your needs.

在以 DTU 為基礎的購買模型中, 您可以為單一資料庫彈性集區選擇基本、標準和 premium 服務層。In the DTU-based purchasing model, you can choose between the basic, standard, and premium service tiers for both single databases and elastic pools. 以 DTU 為基礎的購買模型不適用於受控實例The DTU-based purchasing model isn't available for managed instances.

資料庫交易單位 (DTU)Database transaction units (DTUs)

針對服務層中特定計算大小的單一資料庫, Microsoft 保證該資料庫的特定資源層級 (與 Azure 雲端中的任何其他資料庫無關)。For a single database at a specific compute size within a service tier, Microsoft guarantees a certain level of resources for that database (independent of any other database in the Azure cloud). 這項保證可提供可預測的效能層級。This guarantee provides a predictable level of performance. 配置給資料庫的資源數量是以 Dtu 數計算, 而且是計算、儲存體和 i/o 資源的配套量值。The amount of resources allocated for a database is calculated as a number of DTUs and is a bundled measure of compute, storage, and I/O resources.

這些資源的比率, 原本是由專為實際 OLTP 工作負載一般的線上交易處理 (OLTP) 基準測試工作負載所決定。The ratio among these resources is originally determined by an online transaction processing (OLTP) benchmark workload designed to be typical of real-world OLTP workloads. 當您的工作負載超過其中任何一項資源的數量時, 您的輸送量會進行節流處理, 因而導致效能和時間更慢。When your workload exceeds the amount of any of these resources, your throughput is throttled, resulting in slower performance and time-outs.

您的工作負載所使用的資源, 不會影響 Azure 雲端中其他 SQL 資料庫可用的資源。The resources used by your workload don't impact the resources available to other SQL databases in the Azure cloud. 同樣地, 其他工作負載所使用的資源也不會影響您的 SQL database 可用的資源。Likewise, the resources used by other workloads don't impact the resources available to your SQL database.

週框方塊

Dtu 最適合用於瞭解針對不同計算大小和服務層級的 Azure SQL 資料庫所配置的相對資源。DTUs are most useful for understanding the relative resources that are allocated for Azure SQL databases at different compute sizes and service tiers. 例如:For example:

  • 藉由增加資料庫的計算大小來使 Dtu 加倍, 等於讓該資料庫可用的資源集合加倍。Doubling the DTUs by increasing the compute size of a database equates to doubling the set of resources available to that database.
  • 具有 1750 Dtu 的高階服務層級 P11 資料庫, 比具有5個 Dtu 的基本服務層資料庫, 提供350x 更多 DTU 計算能力。A premium service tier P11 database with 1750 DTUs provides 350x more DTU compute power than a basic service tier database with 5 DTUs.

若要深入瞭解您工作負載的資源 (DTU) 耗用量, 請使用查詢效能深入解析來執行下列動作:To gain deeper insight into the resource (DTU) consumption of your workload, use query-performance insights to:

  • 依 CPU/持續時間/執行計數來識別最前面的查詢, 可能會針對改善的效能進行調整。Identify the top queries by CPU/duration/execution count that can potentially be tuned for improved performance. 例如, 需要大量 i/o 的查詢可受益于記憶體中的優化技術, 以便更充分利用特定服務層級和計算大小的可用記憶體。For example, an I/O-intensive query might benefit from in-memory optimization techniques to make better use of the available memory at a certain service tier and compute size.
  • 向下切入查詢的詳細資料, 以查看其文字及其資源使用方式的歷程記錄。Drill down into the details of a query to view its text and its history of resource usage.
  • 存取效能微調建議, 以顯示SQL Database Advisor所採取的動作。Access performance-tuning recommendations that show actions taken by SQL Database Advisor.

彈性資料庫交易單位 (Edtu)Elastic database transaction units (eDTUs)

對於永遠可用的 SQL 資料庫, 而不是提供可能不一定需要的專屬資源集 (Dtu), 您可以將這些資料庫放入彈性集區中。For SQL databases that are always available, rather than provide a dedicated set of resources (DTUs) that might not always be needed, you can place these databases into an elastic pool. 彈性集區中的資料庫位於單一 Azure SQL Database 伺服器上, 並共用資源集區。The databases in an elastic pool are on a single Azure SQL Database server and share a pool of resources.

彈性集區中的共用資源是以彈性資料庫交易單位 (Edtu) 來測量。The shared resources in an elastic pool are measured by elastic database transaction units (eDTUs). 彈性集區提供簡單、符合成本效益的解決方案, 以管理多個資料庫的效能目標, 這些資料庫的使用模式有很大的不同且無法預測。Elastic pools provide a simple, cost-effective solution to manage performance goals for multiple databases that have widely varying and unpredictable usage patterns. 彈性集區可確保集區中的一個資料庫無法取用所有資源, 同時確保集區中的每個資料庫一律具有所需的最低資源數量。An elastic pool guarantees that all the resources can't be consumed by one database in the pool, while ensuring that each database in the pool always has a minimum amount of necessary resources available.

集區以固定價格提供固定數目的 eDTU。A pool is given a set number of eDTUs for a set price. 在彈性集區中, 個別資料庫可以在設定的界限內自動調整。In the elastic pool, individual databases can autoscale within the configured boundaries. 較繁重的負載下的資料庫會耗用更多 Edtu 以滿足需求。A database under a heavier load will consume more eDTUs to meet demand. 較輕量負載下的資料庫會耗用較少的 Edtu。Databases under lighter loads will consume fewer eDTUs. 沒有負載的資料庫不會取用 eDTU。Databases with no load will consume no eDTUs. 因為資源是針對整個集區所布建, 而不是針對每個資料庫, 所以彈性集區會簡化您的管理工作, 並為集區提供可預測的預算。Because resources are provisioned for the entire pool, rather than per database, elastic pools simplify your management tasks and provide a predictable budget for the pool.

您可以將其他 Edtu 新增至現有的集區, 而不會造成資料庫停機, 而且不會影響集區中的資料庫。You can add additional eDTUs to an existing pool with no database downtime and with no impact on the databases in the pool. 同樣地, 如果您不再需要額外的 Edtu, 請隨時從現有的集區中移除它們。Similarly, if you no longer need extra eDTUs, remove them from an existing pool at any time. 您也可以隨時在集區中新增或減少資料庫。You can also add databases to or subtract databases from a pool at any time. 若要保留其他資料庫的 Edtu, 請限制資料庫在負載過重時可以使用的 Edtu 數目。To reserve eDTUs for other databases, limit the number of eDTUs a database can use under a heavy load. 如果資料庫一致地 underuses 資源, 請將它移出集區, 並將它設定為具有可預測的必要資源量的單一資料庫。If a database consistently underuses resources, move it out of the pool and configure it as a single database with a predictable amount of required resources.

判斷工作負載所需的 DTU 數目Determine the number of DTUs needed by a workload

如果您想要將現有的內部部署或 SQL Server 的虛擬機器工作負載遷移至 Azure SQL Database, 請使用dtu 計算機來估計所需的 dtu 數目。If you want to migrate an existing on-premises or SQL Server virtual machine workload to Azure SQL Database, use the DTU calculator to approximate the number of DTUs needed. 針對現有的 Azure SQL Database 工作負載, 請使用查詢效能深入解析來瞭解您的資料庫資源耗用量 (dtu), 並取得優化工作負載的更深入見解。For an existing Azure SQL Database workload, use query-performance insights to understand your database-resource consumption (DTUs) and gain deeper insights for optimizing your workload. Db resource_stats動態管理檢視 (DMV) 可讓您查看過去一小時的資源耗用量。The sys.dm_db_ resource_stats dynamic management view (DMV) lets you view resource consumption for the last hour. Resource_stats目錄檢視會顯示過去14天的資源耗用量, 但以較低的精確度為五分鐘的平均值。The sys.resource_stats catalog view displays resource consumption for the last 14 days, but at a lower fidelity of five-minute averages.

能受益於彈性資源集區的工作負載Workloads that benefit from an elastic pool of resources

集區非常適用于資源使用率較低的資料庫, 而且使用量尖峰較少。Pools are well-suited for databases with a low resource-utilization average and relatively infrequent utilization spikes. SQL Database 會自動評估現有 SQL Database 伺服器上資料庫的歷程記錄資源使用量, 並建議 Azure 入口網站中的適當集區設定。SQL Database automatically evaluates the historical resource usage of databases on an existing SQL Database server and recommends the appropriate pool configuration in the Azure portal. 如需詳細資訊, 請參閱何時應該考慮 SQL Database 彈性集區?For more information, see When should you consider a SQL Database elastic pool?.

常見問題集 (FAQ)Frequently asked questions (FAQs)

我是否需要讓應用程式離線, 才能從以 DTU 為基礎的服務層級轉換成以 vCore 為基礎的服務層級?Do I need to take my application offline to convert from a DTU-based service tier to a vCore-based service tier?

資料分割No. 您不需要讓應用程式離線。You don't need to take the application offline. 新的服務層級提供簡單的線上轉換方法, 類似于將資料庫從標準升級至高階服務層的現有程式, 還有另一種方式。The new service tiers offer a simple online-conversion method that's similar to the existing process of upgrading databases from the standard to the premium service tier and the other way around. 您可以使用 [Azure 入口網站]、[PowerShell]、[Azure CLI]、[T-sql] 或 REST API 來開始這項轉換。You can start this conversion by using the Azure portal, PowerShell, the Azure CLI, T-SQL, or the REST API. 請參閱管理單一資料庫管理彈性集區See Manage single databases and Manage elastic pools.

是否可以將資料庫從 vCore 為基礎的購買模型中的服務層級, 轉換為以 DTU 為基礎的購買模型中的服務層級?Can I convert a database from a service tier in the vCore-based purchasing model to a service tier in the DTU-based purchasing model?

是, 您可以使用 Azure 入口網站、PowerShell、Azure CLI、T-sql 或 REST API, 輕鬆地將資料庫轉換為任何支援的效能目標。Yes, you can easily convert your database to any supported performance objective by using the Azure portal, PowerShell, the Azure CLI, T-SQL, or the REST API. 請參閱管理單一資料庫管理彈性集區See Manage single databases and Manage elastic pools.

後續步驟Next steps