虛擬核心與 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. 每個時間單位的虛擬核心單位價格較低佈建的計算層中比在無伺服器計算層。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 database 的相對資源。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 的 premium 服務層 P11 資料庫可提供 350 倍的 DTU 計算超過 5 個 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 建議程式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

如果您想要移轉現有內部部署或 Azure SQL Database,使用 SQL Server 虛擬機器工作負載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. Sys.dm_db_ resource_stats動態管理檢視 (DMV) 可讓您檢視過去一小時內的資源耗用量。The sys.dm_db_ resource_stats dynamic management view (DMV) lets you view resource consumption for the last hour. Sys.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 為基礎的服務層轉換成虛擬核心為基礎的服務層?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. 新的服務層會提供類似於現有的處理序,將資料庫從標準升級至 premium 服務層和利用其他方式的簡單線上轉換方法。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