GROUP BY
, ORDER BY
8,060 Bytes per index key 900 bytes for a clustered index. 1,700 bytes for a nonclustered index. For SQL Server 2014 (12.x) and earlier, all versions supported 900 bytes for all index types. The maximum number of bytes in a clustered index key can't exceed 900. For a nonclustered index key, the maximum is 1,700 bytes.
You can define a key using variable-length columns whose maximum sizes add up to more than the limit. However, the combined sizes of the data in those columns can never exceed the limit.
For a hash index key, there's no hard limit on size.
varchar(max)
, varbinary(max)
, xml
, text
, or image
column 2^31-1 Characters per ntext
or nvarchar(max)
column 2^30-1 Clustered indexes per table 1 Columns in GROUP BY
, ORDER BY
Limited only by number of bytes Columns or expressions in a GROUP BY WITH CUBE
or GROUP BY WITH ROLLUP
statement 10 Columns per index key 32 If the table contains one or more XML indexes, the clustering key of the user table is limited to 31 columns because the XML column is added to the clustering key of the primary XML index. You can include non-key columns in a nonclustered index, to avoid the limitation of a maximum of 32 key columns. For more information, see Create Indexes with Included Columns. Columns per foreign key or primary key 32 Columns per INSERT
statement 4,096 Columns per SELECT
statement 4,096 Columns per table 1,024 Tables that include sparse column sets include up to 30,000 columns. See sparse column sets. Columns per UPDATE
statement 4,096 Different limits apply to sparse column sets. Columns per view 1,024 Connections per client Maximum value of configured connections Database size 524,272 terabytes Databases per instance of SQL Server 32,767 Filegroups per database 32,767 Filegroups per database for memory-optimized data 1 Files per database 32,767 File size (data) 16 terabytes File size (log) 2 terabytes Data files for memory-optimized data per database 4,096 in SQL Server 2014 (12.x). The limit is less strict on SQL Server 2016 (13.x) and later. Delta file per data file for memory-optimized data 1 Foreign key table references per table Outgoing = 253.
25 failover cluster instances when using a shared cluster drive as storage.
8 in SQL Server 2016 (13.x) and SQL Server 2014 (12.x).
Locks per connection Maximum locks per server Locks per instance of SQL Server Limited only by memory This value is for static lock allocation. Dynamic locks are limited only by memory. Nested stored procedure levels 32 If a stored procedure accesses more than 64 databases, or more than two databases in interleaving, you'll receive an error. Nested subqueries 32 Nested transactions 4,294,967,296 Nested trigger levels 32 Nonclustered indexes per table 999 Number of distinct expressions in theGROUP BY
clause when any of the following are present: CUBE
, ROLLUP
, GROUPING SETS
, WITH CUBE
, WITH ROLLUP
32 Number of grouping sets generated by operators in the GROUP BY
clause 4,096 Parameters per stored procedure 2,100 Parameters per user-defined function 2,100 REFERENCES per table 253 Rows per table Limited by available storage Tables per database Limited by total number of objects in a database Objects include tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. The sum of the number of all objects in a database can't exceed 2,147,483,647. Partitions per partitioned table or index 15,000 Statistics on non-indexed columns 30,000 Tables per SELECT
statement Limited only by available resources Triggers per table Limited by number of objects in a database Objects include tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. The sum of the number of all objects in a database can't exceed 2,147,483,647. User connections 32,767 XML indexes 249
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4