SQL 資料倉儲容量限制SQL Data Warehouse capacity limits

Azure SQL 資料倉儲各種元件的最大允許值。Maximum values allowed for various components of Azure SQL Data Warehouse.

工作負載管理Workload management

CategoryCategory 描述Description 最大值Maximum
資料倉儲單位 (DWU)Data Warehouse Units (DWU) 單一 SQL 資料倉儲的最大 DWUMax DWU for a single SQL Data Warehouse Gen1:DW6000Gen1: DW6000
Gen2:DW30000cGen2: DW30000c
資料倉儲單位 (DWU)Data Warehouse Units (DWU) 每一部伺服器的預設 DTUDefault DTU per server 54,00054,000
每個 SQL Server (例如 myserver.database.windows.net) 的 DTU 配額為 54,000,最多允許 DW6000c。By default, each SQL server (for example, myserver.database.windows.net) has a DTU Quota of 54,000, which allows up to DW6000c. 此配額僅是安全限制。This quota is simply a safety limit. 您可以藉由建立支援票證,並選取「配額」 做為要求類型來增加配額。You can increase your quota by creating a support ticket and selecting Quota as the request type. 若要計算 DTU 需求,將所需的總 DWU 乘以 7.5,或將所需的總 cDWU 乘以 9.0。To calculate your DTU needs, multiply the 7.5 by the total DWU needed, or multiply 9.0 by the total cDWU needed. 例如:For example:
DW6000 x 7.5 = 45,000 DTUDW6000 x 7.5 = 45,000 DTUs
DW6000c x 9.0 = 54,000 DTU。DW6000c x 9.0 = 54,000 DTUs.
您可以在入口網站的 [SQL Server] 選項中檢視目前的 DTU 耗用量。You can view your current DTU consumption from the SQL server option in the portal. 已暫停和未暫停的資料庫都會計入 DTU 配額。Both paused and unpaused databases count toward the DTU quota.
資料庫連接Database connection 最大並行開啟工作階段Maximum Concurrent open sessions 10241024

同時開啟的工作階段數目會因所選 DWU。The number of concurrent open sessions will vary based on the selected DWU. DWU600c 和更新版本,支援最多 1024年個開啟的工作階段。DWU600c and above support a maximum of 1024 open sessions. DWU500c 和下面,支援最大並行的開啟工作階段限制為 512。DWU500c and below, support a maximum concurrent open session limit of 512. 請注意,可同時執行的查詢數目有所限制。Note, there are limits on the number of queries that can execute concurrently. 超過並行存取限制時,要求會進入內部佇列以等待處理。When the concurrency limit is exceeded, the request goes into an internal queue where it waits to be processed.
資料庫連接Database connection 準備陳述式的最大記憶體Maximum memory for prepared statements 20 MB20 MB
工作負載管理Workload management 並行查詢上限Maximum concurrent queries 128128

SQL 資料倉儲可以執行最多 128 並行查詢和佇列剩餘查詢。SQL Data Warehouse can execute a maximum of 128 concurrent queries and queues remaining queries.

將使用者指派給較高的資源類別,或在 SQL 資料倉儲的資料倉儲單位設定較低時,並行查詢的數目會減少。The number of concurrent queries can decrease when users are assigned to higher resource classes or when SQL Data Warehouse has a lower data warehouse unit setting. 系統總是會允許某些查詢 (例如 DMV 查詢) 執行,而不影響並行查詢限制。Some queries, like DMV queries, are always allowed to run and do not impact the concurrent query limit. 如需並行查詢執行的詳細資訊,請參閱並行最大值一文。For more details on concurrent query execution, see the concurrency maximums article.
tempdbtempdb GB 上限Maximum GB 每一 DW100 399 GB。399 GB per DW100. 因此在 DWU1000,tempdb 大小為 3.99 TB。Therefore at DWU1000, tempdb is sized to 3.99 TB.

資料庫物件Database objects

CategoryCategory 描述Description 最大值Maximum
資料庫Database 大小上限Max size Gen1:在磁碟上壓縮後 240 TB。Gen1: 240 TB compressed on disk. 此空間與 tempdb 或記錄檔空間無關,因此此空間為供永久資料表專用。This space is independent of tempdb or log space, and therefore this space is dedicated to permanent tables. 叢集資料行存放區壓縮估計為 5 X。Clustered columnstore compression is estimated at 5X. 當所有資料表都是叢集資料行存放區 (預設的資料表類型) 時,這個壓縮可讓資料庫成長約 1 PB。This compression allows the database to grow to approximately 1 PB when all tables are clustered columnstore (the default table type).

Gen2:資料列存放區的限制為 240 TB,資料行存放區資料表的儲存體則沒有限制Gen2: 240TB for rowstore and unlimited storage for columnstore tables
資料表Table 大小上限Max size 磁碟上壓縮後 60 TB60 TB compressed on disk
資料表Table 每個資料庫的資料表Tables per database 100,000100,000
資料表Table 每個資料表的資料行Columns per table 1024 個資料行1024 columns
資料表Table 每個資料行的位元組Bytes per column 相依於資料行 資料類型Dependent on column data type. char 資料類型的限制為 8000、nvarchar 為 4000 或 MAX 資料類型為 2 GB。Limit is 8000 for char data types, 4000 for nvarchar, or 2 GB for MAX data types.
資料表Table 每個資料列的位元組,已定義的大小Bytes per row, defined size 8060 個位元組8060 bytes

每個資料列的位元組數目計算方式和使用頁面壓縮的 SQL Server 所使用的方式相同。The number of bytes per row is calculated in the same manner as it is for SQL Server with page compression. 就像 SQL Server,SQL 資料倉儲支援資料列溢位儲存,讓可變長度的資料行能發送至超出資料列。Like SQL Server, SQL Data Warehouse supports row-overflow storage, which enables variable length columns to be pushed off-row. 可變長度的資料列會發送至超出資料列,只有 24 位元組的根會儲存在主要記錄中。When variable length rows are pushed off-row, only 24-byte root is stored in the main record. 如需詳細資訊,請參閱超過 8-KB 的資料列溢位資料For more information, see Row-Overflow Data Exceeding 8-KB.
資料表Table 每個資料表的資料分割Partitions per table 15,00015,000

為了獲得高效能,建議在仍能支援業務需求的情況下,將您需要的資料分割數目降至最低。For high performance, we recommend minimizing the number of partitions you need while still supporting your business requirements. 隨著資料分割數目增加,資料定義語言 (DDL) 和資料操作語言 (DML) 作業的負荷會加重,導致效能變慢。As the number of partitions grows, the overhead for Data Definition Language (DDL) and Data Manipulation Language (DML) operations grows and causes slower performance.
資料表Table 每個資料分割界限值的字元。Characters per partition boundary value. 40004000
索引Index 每個資料表的非叢集索引。Non-clustered indexes per table. 5050

僅適用於資料列存放區資料表。Applies to rowstore tables only.
索引Index 每個資料表的叢集索引。Clustered indexes per table. 11

適用於資料列存放區資料表和資料行存放區資料表。Applies to both rowstore and columnstore tables.
索引Index 索引鍵的大小。Index key size. 900 個位元組。900 bytes.

僅適用於資料列存放區索引。Applies to rowstore indexes only.

建立索引時,如果資料行中的現有資料沒有超過 900 個位元組,就可以在 varchar 資料行上建立大小上限超過 900 個位元組的索引。Indexes on varchar columns with a maximum size of more than 900 bytes can be created if the existing data in the columns does not exceed 900 bytes when the index is created. 不過,後續在資料行上執行 INSERT 或 UPDATE 動作時,如果總計大小超過 900 個位元組,將會失敗。However, later INSERT or UPDATE actions on the columns that cause the total size to exceed 900 bytes will fail.
索引Index 每個索引的索引鍵資料行。Key columns per index. 1616

僅適用於資料列存放區索引。Applies to rowstore indexes only. 叢集資料行存放區索引包含所有資料行。Clustered columnstore indexes include all columns.
統計資料Statistics 結合資料行值的大小。Size of the combined column values. 900 個位元組。900 bytes.
統計資料Statistics 每個統計資料物件的資料行。Columns per statistics object. 3232
統計資料Statistics 每個資料表的資料行上建立的統計資料。Statistics created on columns per table. 30,00030,000
預存程序Stored Procedures 最大巢狀層級。Maximum levels of nesting. 88
檢視View 每個檢視表的資料行Columns per view 1,0241,024

載入Loads

CategoryCategory 描述Description 最大值Maximum
PolyBase 載入Polybase Loads 每列 MB 數MB per row 11

Polybase 載入小於 1 MB 的資料列。Polybase loads rows that are smaller than 1 MB. 不支援載入叢集資料行存放區索引 (CCI) 與資料表的 LOB 資料類型。Loading LOB data types into tables with a Clustered Columnstore Index (CCI) is not supported.

查詢Queries

CategoryCategory 描述Description 最大值Maximum
查詢Query 使用者資料表上已排入佇列的查詢。Queued queries on user tables. 10001000
查詢Query 系統檢視表上的並行查詢。Concurrent queries on system views. 100100
查詢Query 系統檢視表上已排入佇列的查詢Queued queries on system views 10001000
查詢Query 參數個數上限Maximum parameters 20982098
BatchBatch 大小上限Maximum size 65,536*409665,536*4096
SELECT 結果SELECT results 每個資料列的資料行Columns per row 40964096

在 SELECT 結果中,每個資料列一律不超過 4096 個資料行。You can never have more than 4096 columns per row in the SELECT result. 不保證一定可以有 4096 個。There is no guarantee that you can always have 4096. 如果查詢計畫需要暫存資料表,可能會限定每個資料表最多 1024 個資料行。If the query plan requires a temporary table, the 1024 columns per table maximum might apply.
SELECTSELECT 巢狀子查詢Nested subqueries 3232

SELECT 陳述式中一律不超過 32 個巢狀子查詢。You can never have more than 32 nested subqueries in a SELECT statement. 不保證一定可以有 32 個。There is no guarantee that you can always have 32. 例如,JOIN 可以將子查詢加入查詢計畫中。For example, a JOIN can introduce a subquery into the query plan. 子查詢的數目也受限於可用記憶體。The number of subqueries can also be limited by available memory.
SELECTSELECT 每個 JOIN 的資料行Columns per JOIN 1024 個資料行1024 columns

JOIN 中一律不超過 1024 個資料行。You can never have more than 1024 columns in the JOIN. 不保證一定可以有 1024 個。There is no guarantee that you can always have 1024. 如果 JOIN 計畫需要比 JOIN 結果更多資料行的暫存資料表,暫存資料表會受限於 1024 的限制。If the JOIN plan requires a temporary table with more columns than the JOIN result, the 1024 limit applies to the temporary table.
SELECTSELECT 每個 GROUP BY 資料行的位元組。Bytes per GROUP BY columns. 80608060

GROUP BY 子句中的資料行最多可以有 8060 個位元組。The columns in the GROUP BY clause can have a maximum of 8060 bytes.
SELECTSELECT 每個 ORDER BY 資料行的位元組Bytes per ORDER BY columns 8060 個位元組8060 bytes

ORDER BY 子句中的資料行最多可以有 8060 個位元組The columns in the ORDER BY clause can have a maximum of 8060 bytes
每個陳述式的識別項Identifiers per statement 參考的識別項個數Number of referenced identifiers 65,53565,535

SQL 資料倉儲會限制查詢的單一運算式中可包含的識別項個數。SQL Data Warehouse limits the number of identifiers that can be contained in a single expression of a query. 超過此數字會導致 SQL Server 錯誤 8632。Exceeding this number results in SQL Server error 8632. 如需詳細資訊,請參閱內部錯誤:到達運算式服務的限制For more information, see Internal error: An expression services limit has been reached.
字串常值String literals 陳述式中的字串常值數目Number of string literals in a statement 20,00020,000

SQL 資料倉儲會限制查詢的單一運算式中字串常數個數。SQL Data Warehouse limits the number of string constants in a single expression of a query. 超過此數字會導致 SQL Server 錯誤 8632。Exceeding this number results in SQL Server error 8632.

中繼資料Metadata

系統檢視表System view 最大資料列數Maximum rows
sys.dm_pdw_component_health_alertssys.dm_pdw_component_health_alerts 10,00010,000
sys.dm_pdw_dms_coressys.dm_pdw_dms_cores 100100
sys.dm_pdw_dms_workerssys.dm_pdw_dms_workers 最近 1000 個 SQL 要求的 DMS 背景工作角色總數。Total number of DMS workers for the most recent 1000 SQL requests.
sys.dm_pdw_errorssys.dm_pdw_errors 10,00010,000
sys.dm_pdw_exec_requestssys.dm_pdw_exec_requests 10,00010,000
sys.dm_pdw_exec_sessionssys.dm_pdw_exec_sessions 10,00010,000
sys.dm_pdw_request_stepssys.dm_pdw_request_steps 儲存在 sys.dm_pdw_exec_requests 中的最近 1000 個 SQL 要求的步驟總數。Total number of steps for the most recent 1000 SQL requests that are stored in sys.dm_pdw_exec_requests.
sys.dm_pdw_os_event_logssys.dm_pdw_os_event_logs 10,00010,000
sys.dm_pdw_sql_requestssys.dm_pdw_sql_requests 儲存在 sys.dm_pdw_exec_requests 中的最近 1000 個 SQL 要求。The most recent 1000 SQL requests that are stored in sys.dm_pdw_exec_requests.

後續步驟Next steps

如需使用 SQL 資料倉儲的建議,請參閱功能提要For recommendations on using SQL Data Warehouse, see the Cheat Sheet.