Page and its types in SQL Server
In SQL Server, a page is a unit of storage used to store data in a database. A page is the smallest unit of storage that can be read or written to by SQL Server. Each page has a fixed size of 8 KB, and all pages are of the same size.
Data in a database is stored in a series of pages, and each page is assigned a unique page number. SQL Server uses pages to organize and manage data, and the allocation and deallocation of pages is managed by the database engine.
In SQL Server, there are several types of pages used to store data:
Data Page: A data page is used to store the actual data of a table. Each data page can store multiple rows of data.
Index Page: An index page is used to store the data for an index. Indexes are used to improve query performance by allowing SQL Server to quickly find the data it needs.
Text/Image Page: A text/image page is used to store large data types, such as text or images. This type of page is used to store data that does not fit in a single data page.
LOB Page: A LOB (Large Object) page is used to store large data types, such as text or images. This type of page is used to store data that does not fit in a single data page.
Global Allocation Map (GAM) Page: A GAM page is used to manage the allocation of extents within a database. It contains information about which extents are used and which are free.
Shared Global Allocation Map (SGAM) Page: An SGAM page is used to manage the allocation of mixed extents within a database. It contains information about which mixed extents are used and which are free.
Page Free Space (PFS) Page: A PFS page is used to manage the allocation of space within a page. It contains information about how much space is available on a page and how it is used.
Each type of page has a specific purpose in SQL Server and plays a role in managing the storage and performance of a database.
Comments
Post a Comment