Principle: When the hash partition field of the data table is consistent with the partition by field in the analysis function, the data on each partition can be operated independently without interference. Therefore, the efficiency of Oracle analysis functions can be improved quickly. The test procedure is as follows:
Step 1: Create a partition table and a common table with the same structure as DBA_OBJECTS:
- create table t_partition_hash(
- object_name varchar2(128),
- subobject_name varchar2(30),
- object_id number,
- data_object_id number,
- object_type varchar2(19),
- created date,
- last_ddl_time date,
- timestamp varchar2(19),
- status varchar2(7),
- temporary varchar2(1),
- generated varchar2(1),
- secondary varchar2(1)
- )
- partition by hash(object_type)(
- partition t_hash_p1 tablespace USERS,
- partition t_hash_p2 tablespace USERS,
- partition t_hash_p3 tablespace USERS,
- partition t_hash_p4 tablespace USERS,
- partition t_hash_p5 tablespace USERS,
- partition t_hash_p6 tablespace USERS,
- partition t_hash_p7 tablespace USERS,
- partition t_hash_p8 tablespace USERS
- );
- create table t_big_hash(
- object_name varchar2(128),
- subobject_name varchar2(30),
- object_id number,
- data_object_id number,
- object_type varchar2(19),
- created date,
- last_ddl_time date,
- timestamp varchar2(19),
- status varchar2(7),
- temporary varchar2(1),
- generated varchar2(1),
- secondary varchar2(1)
- );
-