Note
This view is available starting with V3.2.1.
Purpose
This view displays the table-level histogram information for all tables in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | NO | The user to which the histogram belongs. |
| TABLE_NAME | VARCHAR2(128) | NO | The name of the table to which the histogram belongs. |
| COLUMN_NAME | VARCHAR2(128) | NO | The name of the column to which the histogram belongs. |
| ENDPOINT_NUMBER | NUMBER | NO | The number of buckets. |
| ENDPOINT_VALUE | NUMBER | NO | The normalized value of the bucket endpoint. |
| ENDPOINT_ACTUAL_VALUE | VARCHAR2(4000) | NO | The value of the bucket endpoint. |
| ENDPOINT_ACTUAL_VALUE_RAW | VARCHAR2(4000) | NO | The binary value of the bucket endpoint. |
| ENDPOINT_REPEAT_COUNT | NUMBER | NO | The frequency of the bucket endpoint value. |
| SCOPE | VARCHAR2(7) | NO | The scope to which the histogram belongs. |
Sample query
Query the table-level histogram information for the T_SUBPART table in the current tenant.
obclient [SYS]> SELECT * FROM SYS.DBA_TAB_HISTOGRAMS WHERE TABLE_NAME='T_SUBPART';
The query result is as follows:
+-------+------------+-------------+-----------------+----------------+-----------------------+---------------------------+-----------------------+-------+
| OWNER | TABLE_NAME | COLUMN_NAME | ENDPOINT_NUMBER | ENDPOINT_VALUE | ENDPOINT_ACTUAL_VALUE | ENDPOINT_ACTUAL_VALUE_RAW | ENDPOINT_REPEAT_COUNT | SCOPE |
+-------+------------+-------------+-----------------+----------------+-----------------------+---------------------------+-----------------------+-------+
| SYS | T_SUBPART | C1 | 1 | NULL | 0 | 0F053F0080000000 | 1 | NULL |
| SYS | T_SUBPART | C1 | 2501 | NULL | 2500 | 0F053F00C0000001C4090000 | 1 | NULL |
| SYS | T_SUBPART | C1 | 5001 | NULL | 5000 | 0F053F00C000000188130000 | 1 | NULL |
| SYS | T_SUBPART | C1 | 7501 | NULL | 7500 | 0F053F00C00000014C1D0000 | 1 | NULL |
| SYS | T_SUBPART | C1 | 10000 | NULL | 9999 | 0F053F00C00000010F270000 | 1 | NULL |
| SYS | T_SUBPART | C2 | 10 | NULL | 0 | 0F053F0080000000 | 10 | NULL |
| SYS | T_SUBPART | C2 | 2510 | NULL | 250 | 0F053F00C0000001FA000000 | 10 | NULL |
| SYS | T_SUBPART | C2 | 5010 | NULL | 500 | 0F053F00C0000001F4010000 | 10 | NULL |
| SYS | T_SUBPART | C2 | 7510 | NULL | 750 | 0F053F00C0000001EE020000 | 10 | NULL |
| SYS | T_SUBPART | C2 | 10000 | NULL | 999 | 0F053F00C0000001E7030000 | 10 | NULL |
| SYS | T_SUBPART | C3 | 5 | NULL | 0 | 0F053F0080000000 | 5 | NULL |
| SYS | T_SUBPART | C3 | 2505 | NULL | 500 | 0F053F00C0000001F4010000 | 5 | NULL |
| SYS | T_SUBPART | C3 | 5005 | NULL | 1000 | 0F053F00C0000001E8030000 | 5 | NULL |
| SYS | T_SUBPART | C3 | 7505 | NULL | 1500 | 0F053F00C0000001DC050000 | 5 | NULL |
| SYS | T_SUBPART | C3 | 10000 | NULL | 1999 | 0F053F00C0000001CF070000 | 5 | NULL |
+-------+------------+-------------+-----------------+----------------+-----------------------+---------------------------+-----------------------+-------+
15 rows in set
References
Query the table-level histogram statistics for all tables accessible to the current user: ALL_TAB_HISTOGRAMS
Query the table-level histogram statistics for all tables owned by the current user: USER_TAB_HISTOGRAMS
Query the partition-level histogram statistics:
Query the subpartition-level histogram statistics:
Query the table-level column statistics:
Query the global-level column statistics:
Query the partition-level column statistics:
Query the subpartition-level column statistics:
Query the index statistics:
For information about how to collect statistics, see the following topics:
