SQL Server中分区和页面的区别?

时间:2021-04-05 20:10:29

What is the difference between partition and page in SQL Server? Is these are available by default or we need to create explicitly?

SQL Server中分区和页面的区别是什么?这些是默认可用的还是需要显式创建?

1 个解决方案

#1


4  

Page is the most basic element of storage in SQL Server.

页面是SQL Server中最基本的存储元素。

In SQL Server, the page size is 8 KB. This means SQL Server databases have 128 pages per megabyte. Each page begins with a 96-byte header that is used to store system information about the page. This information includes the page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page.

在SQL Server中,页面大小为8kb。这意味着SQL Server数据库每兆字节有128个页面。每个页面都有一个96字节的头,用来存储关于页面的系统信息。这些信息包括页面编号、页面类型、页面上的可用空间数量以及拥有页面的对象的分配单元ID。

Partition:- Partitioning allows a table, index, or index-organized table to be subdivided into smaller pieces, where each piece of such a database object is called a partition. Each partition has its own name, and may optionally have its own storage characteristics. The data of partitioned tables and indexes is divided into units that can be spread across more than one filegroup in a database. The data is partitioned horizontally, so that groups of rows are mapped into individual partitions.

分区:-分区允许将表、索引或索引组织的表细分为更小的部分,其中这样的数据库对象的每个部分称为分区。每个分区都有自己的名称,并且可能有自己的存储特性。分区表和索引的数据被划分为可以跨数据库中的多个文件组分布的单元。数据是水平分区的,因此行组被映射到单独的分区中。

SQL Server 2012 supports up to 15,000 partitions by default. In earlier versions, the number of partitions was limited to 1,000 by default. On x86-based systems, creating a table or index with more than 1000 partitions is possible, but is not supported.

SQL Server 2012默认支持最多15,000个分区。在早期版本中,默认情况下,分区的数量限制为1,000个。在基于x86的系统上,创建一个包含超过1000个分区的表或索引是可能的,但是不受支持。

#1


4  

Page is the most basic element of storage in SQL Server.

页面是SQL Server中最基本的存储元素。

In SQL Server, the page size is 8 KB. This means SQL Server databases have 128 pages per megabyte. Each page begins with a 96-byte header that is used to store system information about the page. This information includes the page number, page type, the amount of free space on the page, and the allocation unit ID of the object that owns the page.

在SQL Server中,页面大小为8kb。这意味着SQL Server数据库每兆字节有128个页面。每个页面都有一个96字节的头,用来存储关于页面的系统信息。这些信息包括页面编号、页面类型、页面上的可用空间数量以及拥有页面的对象的分配单元ID。

Partition:- Partitioning allows a table, index, or index-organized table to be subdivided into smaller pieces, where each piece of such a database object is called a partition. Each partition has its own name, and may optionally have its own storage characteristics. The data of partitioned tables and indexes is divided into units that can be spread across more than one filegroup in a database. The data is partitioned horizontally, so that groups of rows are mapped into individual partitions.

分区:-分区允许将表、索引或索引组织的表细分为更小的部分,其中这样的数据库对象的每个部分称为分区。每个分区都有自己的名称,并且可能有自己的存储特性。分区表和索引的数据被划分为可以跨数据库中的多个文件组分布的单元。数据是水平分区的,因此行组被映射到单独的分区中。

SQL Server 2012 supports up to 15,000 partitions by default. In earlier versions, the number of partitions was limited to 1,000 by default. On x86-based systems, creating a table or index with more than 1000 partitions is possible, but is not supported.

SQL Server 2012默认支持最多15,000个分区。在早期版本中,默认情况下,分区的数量限制为1,000个。在基于x86的系统上,创建一个包含超过1000个分区的表或索引是可能的,但是不受支持。