ALL_PART_COL_STATISTICS

2025-11-14 07:33:33  Updated

Note

This view is introduced in V3.2.1.

Purpose

The ALL_PART_COL_STATISTICS view displays the column statistics and histograms of the primary partitions of the partitioned tables that the current user can access.

Applicability

This view is available only in Oracle mode.

Sample query

Query the column statistics and histograms of the primary partitions of the T_SUBPART table in the partitioned tables that the current user can access.

obclient [SYS]> SELECT * FROM SYS.ALL_PART_COL_STATISTICS WHERE TABLE_NAME='T_SUBPART';

The query result is as follows:

+-------+------------+----------------+-------------+--------------+-----------+------------+-----------------------+-----------+-------------+-------------+---------------+--------------+------------+-------+-------------+-----------+
| OWNER | TABLE_NAME | PARTITION_NAME | COLUMN_NAME | NUM_DISTINCT | LOW_VALUE | HIGH_VALUE | DENSITY               | NUM_NULLS | NUM_BUCKETS | SAMPLE_SIZE | LAST_ANALYZED | GLOBAL_STATS | USER_STATS | NOTES | AVG_COL_LEN | HISTOGRAM |
+-------+------------+----------------+-------------+--------------+-----------+------------+-----------------------+-----------+-------------+-------------+---------------+--------------+------------+-------+-------------+-----------+
| SYS   | T_SUBPART  | P2             | C1          |         2658 | 3         | 9995       | .00037622272385252068 |         0 |           5 |        2504 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P1             | C1          |         4986 | 0         | 9999       | .00020056157240272763 |         0 |           5 |        4966 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P0             | C1          |         2646 | 2         | 9998       |  .0003779289493575208 |         0 |           5 |        2530 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P2             | C2          |          965 | 1         | 999        |  .0010362694300518134 |         0 |           5 |        2504 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P1             | C2          |         1031 | 0         | 999        | .00096993210475266732 |         0 |           5 |        4966 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P0             | C2          |          975 | 0         | 999        |  .0010256410256410256 |         0 |           5 |        2530 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P2             | C3          |         1498 | 1         | 1999       | .00066755674232309744 |         0 |           5 |        2504 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P1             | C3          |         1933 | 0         | 1999       | .00051733057423693739 |         0 |           5 |        4966 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
| SYS   | T_SUBPART  | P0             | C3          |         1529 | 0         | 1999       | .00065402223675604975 |         0 |           5 |        2530 | 17-MAR-25     | NO           | NO         | NULL  |          20 | HYBRID    |
+-------+------------+----------------+-------------+--------------+-----------+------------+-----------------------+-----------+-------------+-------------+---------------+--------------+------------+-------+-------------+-----------+
9 rows in set

References

Contact Us