有没有办法找出,是否在Oracle中使用哈希,范围或列表对表进行了分区? 我在元数据表中找不到这样的信息。
感谢您的帮助。
答案 0 :(得分:2)
您尚未充分搜索元数据表。
Connected to Oracle Database 12c Enterprise Edition Release 12.2.0.1.0
Connected as xxx@yyy
SQL> select owner, table_name, partitioning_type, subpartitioning_type
SQL> from all_part_tables
SQL> where owner = 'SYS'
SQL> and rownum <= 10
SQL> ;
OWNER TABLE_NAME PARTITIONING_TYPE SUBPARTITIONING_TYPE
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------- --------------------
SYS AQ$_SUBSCRIBER_LWM HASH NONE
SYS WRH$_FILESTATXS RANGE NONE
SYS WRH$_SQLSTAT RANGE NONE
SYS WRH$_SYSTEM_EVENT RANGE NONE
SYS WRH$_WAITSTAT RANGE NONE
SYS WRH$_LATCH RANGE NONE
SYS WRH$_LATCH_CHILDREN RANGE NONE
SYS WRH$_LATCH_PARENT RANGE NONE
SYS WRH$_LATCH_MISSES_SUMMARY RANGE NONE
SYS WRH$_EVENT_HISTOGRAM RANGE NONE
10 rows selected
SQL>
使用user_part_tables
代替all_part_tables
应该会更好,然后请忽略owner = 'SYS'
子句中的where
谓词。