syspartitions

Applies to all databases. syspartitions contains one row for each data partition and one row for each index partition.

For each database, syspartitions contains one row for:
  • Each table partition. indid is 0.

  • Each clustered index partition. indid is 1.

  • Each nonclustered index partition. indid is >1.

  • Each single-partitioned (unpartitioned) table.

  • Each single-partitioned (unpartitioned) clustered or nonclustered index.

If an index is local, the value for partitionid (data partition row) and data_partitionid (associated index row) are the same. If the index is not local, the value for data_partitionid (index row) is zero (0), and it does not equal that for partitionid (data partition row).

Note: The syspartitions table in versions of SAP ASE earlier than 15.0 has been renamed sysslices and made obsolete. With SAP ASE version 15.0, syspartitions is completely redefined, and now supports data and index partitioning.

Columns

The columns for syspartitions are:

Name

Datatype

Description

name

varchar(255)

Partition name.

indid

smallint

on an allpages-locked table

Index ID. Values are:
  • 0 – data pages (table)

  • 1 – clustered index on an allpages-locked table

  • >1 and <255 – nonclustered index or a clustered index on a data-only-locked table

  • 255 – text chain

id

int

Table ID.

partitionid

int

ID of data or index partition.

segment

smallint

ID of segment on which partition resides.

status

int

Internal status information.

datoampage

unsigned int

Page number for the object allocation map of a data partition.

indoampage

unsigned int

Page number of the object allocation map of an index partition.

firstpage

unsigned int

Page number of the first data or leaf page.

rootpage

unsigned int

Page number of:
  • Root page if entry is an index partition

  • Last page if entry is a data partition

data_partitionid

int

ID of data partition this index spans. Values are:
  • 0 – for global indexes spanning the entire table

  • Non-zero – partition ID of the data partition that a local index's partition spans.

crdate

datetime

Date the partition created.

cdataptnname

varchar(255) null

Name of data partition.

lobcomp_lvl

tinyint

LOB compression level

ptndcompver

tinyint

Version of datacompression algorithm used

Indexes

  • Unique clustered index on id, indid, partitionid

  • Unique nonclustered index on id, indid, name

  • Unique nonclustered index on partitionid, indid