查看 table 是如何分区的
Find out how is table partitioned
有什么办法可以查出,table在Oracle中是按Hash、Range还是List分区的?
我在元数据 tables.
中找不到此类信息
感谢您的帮助。
您对元数据表的搜索还不够。
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
,然后请从 where
子句中省略 owner = 'SYS'
谓词。
有什么办法可以查出,table在Oracle中是按Hash、Range还是List分区的? 我在元数据 tables.
中找不到此类信息感谢您的帮助。
您对元数据表的搜索还不够。
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
,然后请从 where
子句中省略 owner = 'SYS'
谓词。