Skip to content

difference cost between format=verbose and format=cost_trace #61155

@hawkingrei

Description

@hawkingrei

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

refactor the test TestQ4 in the pkg/planner/core/casetest/tpch

the one use format=verbase

        testkit.LoadTableStats("lineitem_stats.json", dom)
	testkit.LoadTableStats("orders_stats.json", dom)
	testkit.SetTiFlashReplica(t, dom, "olap", "orders")
	testkit.SetTiFlashReplica(t, dom, "olap", "lineitem")
	tk.MustExec(`set @@session.tidb_enforce_mpp=1;`)
	q4 := `explain format='verbose' select

the other one use format=cost_trace

        testkit.LoadTableStats("lineitem_stats.json", dom)
	testkit.LoadTableStats("orders_stats.json", dom)
	testkit.SetTiFlashReplica(t, dom, "olap", "orders")
	testkit.SetTiFlashReplica(t, dom, "olap", "lineitem")
	tk.MustExec(`set @@session.tidb_enforce_mpp=1;`)
	q4 := `explain format='cost_trace' select

2. What did you expect to see? (Required)

it should be the same cost.

3. What did you see instead (Required)

+[Sort_11 1.00 41.63 root  olap.orders.o_orderpriority]
        	            	+[└─TableReader_119 1.00 37.03 root  MppVersion: 3, data:ExchangeSender_118]
        	            	+[  └─ExchangeSender_118 1.00 555425371190.56 mpp[tiflash]  ExchangeType: PassThrough]
        	            	+[    └─Projection_14 1.00 555425371190.56 mpp[tiflash]  olap.orders.o_orderpriority, Column#26]
        	            	+[      └─Projection_114 1.00 555425371190.55 mpp[tiflash]  Column#26, olap.orders.o_orderpriority]
        	            	+[        └─HashAgg_115 1.00 555425371190.54 mpp[tiflash]  group by:olap.orders.o_orderpriority, funcs:sum(Column#31)->Column#26, funcs:firstrow(olap.orders.o_orderpriority)->olap.orders.o_orderpriority]
        	            	+[          └─ExchangeReceiver_117 1.00 555425371115.43 mpp[tiflash]  ]
        	            	+[            └─ExchangeSender_116 1.00 555425371092.43 mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.orders.o_orderpriority, collate: utf8mb4_bin]]
        	            	+[              └─HashAgg_112 1.00 555425371092.43 mpp[tiflash]  group by:olap.orders.o_orderpriority, funcs:count(1)->Column#31]
        	            	+[                └─Projection_101 45161741.07 555360121335.74 mpp[tiflash]  olap.orders.o_orderpriority, olap.orders.o_orderkey]
        	            	+[                  └─HashJoin_100 45161741.07 555359687783.03 mpp[tiflash]  semi join, left side:ExchangeReceiver_42, equal:[eq(olap.orders.o_orderkey, olap.lineitem.l_orderkey)]]
        	            	+[                    ├─ExchangeReceiver_42(Build) 56452176.33 106009616926.41 mpp[tiflash]  ]
        	            	+[                    │ └─ExchangeSender_41 56452176.33 103403219945.10 mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.orders.o_orderkey, collate: binary]]
        	            	+[                    │   └─TableFullScan_39 56452176.33 96203219945.10 mpp[tiflash] table:orders pushed down filter:ge(olap.orders.o_orderdate, 1995-01-01 00:00:00.000000), lt(olap.orders.o_orderdate, 1995-04-01 00:00:00.000000), keep order:false]
        	            	+[                    └─ExchangeReceiver_50(Probe) 4799991767.20 441536320597.28 mpp[tiflash]  ]
        	            	+[                      └─ExchangeSender_49 4799991767.20 403136386459.68 mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.lineitem.l_orderkey, collate: binary]]
        	            	+[                        └─Projection_45 4799991767.20 403136386459.68 mpp[tiflash]  olap.lineitem.l_orderkey]
        	            	+[                          └─Selection_48 4799991767.20 403113346499.19 mpp[tiflash]  lt(olap.lineitem.l_commitdate, olap.lineitem.l_receiptdate)]
        	            	+[                            └─TableFullScan_47 5999989709.00 388713371197.59 mpp[tiflash] table:lineitem pushed down filter:empty, keep order:false]
        	            	+[Sort_11 1.00 30376223733.51 ((((((((((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00))) + (net(1*rowsize(23)*tidb_flash_net_factor(2.2))))/15.00)*1.00) + ((exprCPU(1*0*tidb_cpu_factor(49.9))) + (orderCPU(1*log(1)*tidb_cpu_factor(49.9)))) + (sortMem(1*23*tidb_mem_factor(0.2))))*1.00 root  olap.orders.o_orderpriority]
        	            	+[└─TableReader_119 1.00 30376223728.91 ((((((((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00))) + (net(1*rowsize(23)*tidb_flash_net_factor(2.2))))/15.00)*1.00 root  MppVersion: 3, data:ExchangeSender_118]
        	            	+[  └─ExchangeSender_118 1.00 455643355883.01 (((((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) mpp[tiflash]  ExchangeType: PassThrough]
        	            	+[    └─Projection_14 1.00 455643355883.01 ((((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00) mpp[tiflash]  olap.orders.o_orderpriority, Column#26]
        	            	+[      └─Projection_114 1.00 455643355883.00 (((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00) + ((cpu(1*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00) mpp[tiflash]  Column#26, olap.orders.o_orderpriority]
        	            	+[        └─HashAgg_115 1.00 455643355882.99 ((cpu(10*3*tiflash_cpu_factor(2.4))) + (((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1)))) + (((agg(1*aggs(2)*tiflash_cpu_factor(2.4))) + (group(1*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashprobe(1*tiflash_cpu_factor(2.4)))))/5.00))*1.00 mpp[tiflash]  group by:olap.orders.o_orderpriority, funcs:sum(Column#31)->Column#26, funcs:firstrow(olap.orders.o_orderpriority)->olap.orders.o_orderpriority]
        	            	+[          └─ExchangeReceiver_117 1.00 455643355807.88 ((((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00)) + (net(1*rowsize(23)*tiflash_mpp_net_factor(1))) mpp[tiflash]  ]
        	            	+[            └─ExchangeSender_116 1.00 455643355784.88 (((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00) mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.orders.o_orderpriority, collate: utf8mb4_bin]]
        	            	+[              └─HashAgg_112 1.00 455643355784.88 ((cpu(10*3*tiflash_cpu_factor(2.4))) + ((((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00)) + (((agg(4.516174106666671e+07*aggs(1)*tiflash_cpu_factor(2.4))) + (group(4.516174106666671e+07*cols(0.01)*tiflash_cpu_factor(2.4))) + ((hashkey(1*1*tiflash_cpu_factor(2.4))) + (hashmem(1*23*tiflash_mem_factor(0.05))) + (hashbuild(1*tiflash_cpu_factor(2.4)))) + ((hashkey(4.516174106666671e+07*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.516174106666671e+07*tiflash_cpu_factor(2.4)))))/5.00))*1.00 mpp[tiflash]  group by:olap.orders.o_orderpriority, funcs:count(1)->Column#31]
        	            	+[                └─Projection_101 45161741.07 455578106028.19 (((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00) + ((cpu(4.516174106666671e+07*filters(0.02)*tiflash_cpu_factor(2.4)))/5.00) mpp[tiflash]  olap.orders.o_orderpriority, olap.orders.o_orderkey]
        	            	+[                  └─HashJoin_100 45161741.07 455577672475.48 ((((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1)))) + (((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1)))) + ((((hashkey(5.645217633333338e+07*1*tiflash_cpu_factor(2.4))) + (hashmem(5.645217633333338e+07*46.17*tiflash_mem_factor(0.05))) + (hashbuild(5.645217633333338e+07*tiflash_cpu_factor(2.4)))) + (cpu(5.645217633333338e+07*filters(0)*tiflash_cpu_factor(2.4))) + ((hashkey(4.7999917672e+09*1*tiflash_cpu_factor(2.4))) + (hashprobe(4.7999917672e+09*tiflash_cpu_factor(2.4)))) + (cpu(4.7999917672e+09*filters(0)*tiflash_cpu_factor(2.4))))/3.00))*1.00 mpp[tiflash]  semi join, left side:ExchangeReceiver_42, equal:[eq(olap.orders.o_orderkey, olap.lineitem.l_orderkey)]]
        	            	+[                    ├─ExchangeReceiver_42(Build) 56452176.33 6227601618.86 ((((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00)) + (net(5.645217633333338e+07*rowsize(46.17)*tiflash_mpp_net_factor(1))) mpp[tiflash]  ]
        	            	+[                    │ └─ExchangeSender_41 56452176.33 3621204637.55 (((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00) mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.orders.o_orderkey, collate: binary]]
        	            	+[                    │   └─TableFullScan_39 56452176.33 3621204637.55 ((scan(5.645217633333338e+07*logrowsize(46.17)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(46.17)*tiflash_scan_factor(11.6))))*1.00 mpp[tiflash] table:orders pushed down filter:ge(olap.orders.o_orderdate, 1995-01-01 00:00:00.000000), lt(olap.orders.o_orderdate, 1995-04-01 00:00:00.000000), keep order:false]
        	            	+[                    └─ExchangeReceiver_50(Probe) 4799991767.20 441536320597.28 ((((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00))) + (net(4.7999917672e+09*rowsize(8)*tiflash_mpp_net_factor(1))) mpp[tiflash]  ]
        	            	+[                      └─ExchangeSender_49 4799991767.20 403136386459.68 (((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00)) mpp[tiflash]  ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: olap.lineitem.l_orderkey, collate: binary]]
        	            	+[                        └─Projection_45 4799991767.20 403136386459.68 ((cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00)) + ((cpu(4.7999917672e+09*filters(0.01)*tiflash_cpu_factor(2.4)))/5.00) mpp[tiflash]  olap.lineitem.l_orderkey]
        	            	+[                          └─Selection_48 4799991767.20 403113346499.19 (cpu(5.999989709e+09*filters(1)*tiflash_cpu_factor(2.4))) + (((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00) mpp[tiflash]  lt(olap.lineitem.l_commitdate, olap.lineitem.l_receiptdate)]
        	            	+[                            └─TableFullScan_47 5999989709.00 388713371197.59 ((scan(5.999989709e+09*logrowsize(48)*tiflash_scan_factor(11.6))) + (scan(10000*logrowsize(48)*tiflash_scan_factor(11.6))))*1.00 mpp[tiflash] table:lineitem pushed down filter:empty, keep order:false]
        	            	 

4. What is your TiDB version? (Required)

7419112

Metadata

Metadata

Assignees

Labels

affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.epic/cost-modelthe optimizer cost modelseverity/moderatesig/plannerSIG: Plannertype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions