UNION ALL MAY USE Much PGA ,设置较大的 PGA 和 db_file_multiblock_read_count, 启用并行 且提高 direct path read的单次IO count .
set timing on;
alter session set workarea_size_policy=MANUAL;
alter session set workarea_size_policy=MANUAL;
alter session set db_file_multiblock_read_count=512;
alter session set db_file_multiblock_read_count=512;
alter session set events '10351 trace name context forever, level 128';
alter session set sort_area_size=734003200;
alter session set sort_area_size=734003200;
alter session set "_sort_multiblock_read_count"=128;
alter session set "_sort_multiblock_read_count"=128;
alter session enable parallel query;
alter session enable parallel dml;
force the temp_total to be nologging
alter table xx nologgin;
alter table xx compress x ;