mysql> EXPLAIN EXTENDED insert /*+ enable_parallel_dml parallel(16) DIRECT(true, 0, 'full') NO_GATHER_OPTIMIZER_STATISTICS */ into tmp1 select * from sbtest1; +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Query Plan | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ============================================================================ | | |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| | | ---------------------------------------------------------------------------- | | |0 |PX COORDINATOR | |10000000|82001199 | | | |1 |+-EXCHANGE OUT DISTR |:EX10001 |10000000|68171982 | | | |2 | +-INSERT | |10000000|66227940 | | | |3 | +-EXCHANGE IN DISTR | |10000000|2901089 | | | |4 | +-EXCHANGE OUT DISTR (HASH)|:EX10000 |10000000|2036763 | | | |5 | +-SUBPLAN SCAN |ANONYMOUS_VIEW1|10000000|92720 | | | |6 | +-PX BLOCK ITERATOR | |10000000|91066 | | | |7 | +-TABLE FULL SCAN |sbtest1 |10000000|91066 | | | ============================================================================ | | Outputs & filters: | | ------------------------------------- | | 0 - output(nil), filter(nil), rowset=256 | | 1 - output(nil), filter(nil), rowset=256 | | dop=16 | | 2 - output(nil), filter(nil), rowset=256 | | columns([{tmp1: ({tmp1: (tmp1.id(0x7f2452e12340), tmp1.k(0x7f2452e12790), tmp1.c(0x7f2452e12be0), tmp1.pad(0x7f2452e13030))})}]), partitions(p0), | | | | column_values([column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.id(0x7f2452e28a60))(0x7f2452e29bd0)], [column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.k(0x7f2452e28eb0))(0x7f2452e31b00)], | | [column_conv(CHAR,utf8mb4_bin,length:120,NOT NULL,ANONYMOUS_VIEW1.c(0x7f2452e29300))(0x7f2452e39a30)], [column_conv(CHAR,utf8mb4_bin,length:60,NOT NULL, | | ANONYMOUS_VIEW1.pad(0x7f2452e29750))(0x7f2452e53f90)]) | | 3 - output([column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.id(0x7f2452e28a60))(0x7f2452e29bd0)], [ANONYMOUS_VIEW1.k(0x7f2452e28eb0)], [ANONYMOUS_VIEW1.c(0x7f2452e29300)], | | [ANONYMOUS_VIEW1.pad(0x7f2452e29750)]), filter(nil), rowset=256 | | 4 - output([column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.id(0x7f2452e28a60))(0x7f2452e29bd0)], [ANONYMOUS_VIEW1.k(0x7f2452e28eb0)], [ANONYMOUS_VIEW1.c(0x7f2452e29300)], | | [ANONYMOUS_VIEW1.pad(0x7f2452e29750)]), filter(nil), rowset=256 | | (#keys=1, [column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.id(0x7f2452e28a60))(0x7f2452e29bd0)]), dop=16 | | 5 - output([ANONYMOUS_VIEW1.id(0x7f2452e28a60)], [ANONYMOUS_VIEW1.k(0x7f2452e28eb0)], [ANONYMOUS_VIEW1.c(0x7f2452e29300)], [ANONYMOUS_VIEW1.pad(0x7f2452e29750)]), filter(nil), rowset=256 | | access([ANONYMOUS_VIEW1.id(0x7f2452e28a60)], [ANONYMOUS_VIEW1.k(0x7f2452e28eb0)], [ANONYMOUS_VIEW1.c(0x7f2452e29300)], [ANONYMOUS_VIEW1.pad(0x7f2452e29750)]) | | 6 - output([sbtest1.id(0x7f2452e275d0)], [sbtest1.k(0x7f2452e27a20)], [sbtest1.c(0x7f2452e27e70)], [sbtest1.pad(0x7f2452e282c0)]), filter(nil), rowset=256 | | 7 - output([sbtest1.id(0x7f2452e275d0)], [sbtest1.k(0x7f2452e27a20)], [sbtest1.c(0x7f2452e27e70)], [sbtest1.pad(0x7f2452e282c0)]), filter(nil), rowset=256 | | access([sbtest1.id(0x7f2452e275d0)], [sbtest1.k(0x7f2452e27a20)], [sbtest1.c(0x7f2452e27e70)], [sbtest1.pad(0x7f2452e282c0)]), partitions(p0) | | is_index_back=false, is_global_index=false, | | range_key([sbtest1.id(0x7f2452e275d0)]), range(MIN ; MAX)always true | | Used Hint: | | ------------------------------------- | | /*+ | | | | PARALLEL(16) | | ENABLE_PARALLEL_DML | | NO_GATHER_OPTIMIZER_STATISTICS | | DIRECT(TRUE, 0, 'FULL') | [0/1928] | */ | | Qb name trace: | | ------------------------------------- | | stmt_id:0, stmt_type:T_EXPLAIN | | stmt_id:1, INS$1 | | stmt_id:2, SEL$1 | | Outline Data: | | ------------------------------------- | | /*+ | | BEGIN_OUTLINE_DATA | | PARALLEL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1" 16) | | FULL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1") | | PARALLEL(16) | | ENABLE_PARALLEL_DML | | OPTIMIZER_FEATURES_ENABLE('4.3.5.0') | | NO_GATHER_OPTIMIZER_STATISTICS | | DIRECT(TRUE, 0, 'FULL') | | END_OUTLINE_DATA | | */ | | Optimization Info: | | ------------------------------------- | | sbtest1: | | table_rows:6111888 | | physical_range_rows:10000000 | | logical_range_rows:10000000 | | index_back_rows:0 | | output_rows:10000000 | | table_dop:16 | | dop_method:Global DOP | | avaiable_index_name:[k_1, sbtest1] | | pruned_index_name:[k_1] | | stats info:[version=2025-01-20 17:22:24.528913, is_locked=0, is_expired=0] | | dynamic sampling level:0 | | estimation method:[OPTIMIZER STATISTICS, STORAGE] | | Plan Type: | | DISTRIBUTED | | Note: | | Degree of Parallelism is 16 because of hint | | Direct-mode full is enabled in insert into select | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 82 rows in set (0.00 sec)