0% found this document useful (0 votes)
103 views

Sys Partition

The sys.partitions view contains a row for each partition of tables and indexes in the database, with some index types excluded. All tables and indexes contain at least one partition, whether explicitly partitioned or not. The view provides information on each partition, including the ID, object, index, number, rows, compression, and more.

Uploaded by

Niranjan Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Sys Partition

The sys.partitions view contains a row for each partition of tables and indexes in the database, with some index types excluded. All tables and indexes contain at least one partition, whether explicitly partitioned or not. The view provides information on each partition, including the ID, object, index, number, rows, compression, and more.

Uploaded by

Niranjan Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

sys.

partitions (Transact-SQL)
Contains a row for each partition of all the tables and most types of indexes in the database. Special index types
like Fulltext, Spatial, and XML are not included in this view. All tables and indexes in SQL Server 2008 contain at
least one partition, whether or not they are explicitly partitioned.

Column name Data type Description

partition_id bigint ID of the partition. Is unique within a database.

object_id int ID of the object to which this partition belongs. Every table or
view is composed of at least one partition.

index_id int ID of the index within the object to which this partition belongs.

partition_number int 1-based partition number within the owning index or heap. For
non-partitioned tables and indexes, the value of this column is 1.

hobt_id bigint ID of the data heap or B-tree that contains the rows for this
partition.

rows bigint Approximate number of rows in this partition.

data_compression int Indicates the state of compression for each partition:


0 = NONE
1 = ROW
2 = PAGE
Note
Full text indexes will be compressed in any edition of SQL Server.

data_compression_desc nvarchar(60) Indicates the state of compression for each partition. Possible
values are NONE, ROW, and PAGE.

type_desc nvarchar(60) Description of the object type:


AGGREGATE_FUNCTION
CHECK_CONSTRAINT
DEFAULT_CONSTRAINT
FOREIGN_KEY_CONSTRAINT
SQL_SCALAR_FUNCTION
CLR_SCALAR_FUNCTION
CLR_TABLE_VALUED_FUNCTION
SQL_INLINE_TABLE_VALUED_FUNCTION
INTERNAL_TABLE
SQL_STORED_PROCEDURE
CLR_STORED_PROCEDURE
PLAN_GUIDE
PRIMARY_KEY_CONSTRAINT
RULE
REPLICATION_FILTER_PROCEDURE
SYSTEM_TABLE
SYNONYM
SERVICE_QUEUE
CLR_TRIGGER
SQL_TABLE_VALUED_FUNCTION
SQL_TRIGGER
TABLE_TYPE
USER_TABLE
UNIQUE_CONSTRAINT
VIEW
EXTENDED_STORED_PROCEDURE

create_date datetime Date the object was created.

modify_date datetime Date the object was last modified by using an ALTER statement. If
the object is a table or a view, modify_date also changes when a
clustered index on the table or view is created or altered.

is_ms_shipped bit Object is created by an internal SQL Server component.

is_published bit Object is published.

is_schema_published bit Only the schema of the object is published.

http://technet.microsoft.com/en-us/library/ms173760.aspx

You might also like