There are several functions you can use to display partition information. See the Reference Manual for complete syntax and usage information.
data_pages – returns the number of pages used by a table, index, or partition.
reserved_pages – returns the number of pages reserved for a table, index, or partition.
row_count – estimates the number of rows in a table or partition.
used_pages – returns the number of pages used by a table, index, or partition. Unlike data_pages, used_pages includes pages used by internal structures.
partition_id – returns the partition ID of a specified partition for specified index.
partition_name – returns the partition name corresponding to the specified index and partition IDs.
This example returns the number of pages used by the object with an ID of 31000114 in the specified database. The number of pages includes those for indexes.
data_pages(5, 31000114)
This example returns the partition ID corresponding to the testtable_ptn1 partition.
select partition_id(“testtable”, testtable_ptn1”)
This example returns the partition name for the partition ID 1111111111 belonging to the base table with an index ID of 0.
select partition_name(0, 1111111111)
Copyright © 2005. Sybase Inc. All rights reserved. |