sp_helpartition

Description

Lists the partition number, first page, control page, and number of data pages and summary size information for each partition in a partitioned table.

Syntax

sp_helpartition [table_name]

Parameters

table_name

is the name of a partitioned table in the current database. If the table name is not supplied, the owner, tables name, and number of partitions is printed for all user tables in the database.

Examples

Example 1

Returns information about the partitions in sales:

sp_helpartition sales

partitionid firstpage   controlpage ptn_data_pages
----------- ----------- ----------- --------------
          1         313         314           4227
          2       12802       12801           4285
          3       25602       25601           4404
          4       38402       38401           4523
          5       51202       51201           4347
          6       64002       64001           4285

(6 rows affected)
Partitions Average Pages Maximum Pages Minimum Pages Ratio (Max/Avg)
---------- ------------- ------------- ------------- ---------------
         6          4345          4523          4227        1.040967

Usage


Accuracy of results

Permissions

Any user can execute sp_helpartition.

See also

Catalog system procedures sp_statistics

Commands alter table, insert

System procedures sp_helpsegment