Retrieving Information about a Partitioned Table v11

Advanced Server provides five system catalog views that you can use to view information about the structure of partitioned tables.

Querying the Partitioning Views

You can query the following views to retrieve information about partitioned and subpartitioned tables:

  • ALL_PART_TABLES
  • ALL_TAB_PARTITIONS
  • ALL_TAB_SUBPARTITIONS
  • ALL_PART_KEY_COLUMNS
  • ALL_SUBPART_KEY_COLUMNS

The structure of each view is explained in Table Partitioning Views - Reference. If you are using the EDB-PSQL client, you can also discover the structure of a view by entering:

\d <view_name>

Where view_name specifies the name of the table partitioning view.

Querying a view can provide information about the structure of a partitioned or subpartitioned table. For example, the following code snippet displays the names of a subpartitioned table:

edb=# SELECT subpartition_name, partition_name FROM ALL_TAB_SUBPARTITIONS;
 subpartition_name | partition_name
-------------------+----------------
 EUROPE_2011       | EUROPE
 EUROPE_2012       | EUROPE
 ASIA_2011         | ASIA
 ASIA_2012         | ASIA
 AMERICAS_2011     | AMERICAS
 AMERICAS_2012     | AMERICAS
(6 rows)

table_partitioning_views_reference