Evgeny Stanilovsky created IGNITE-25083:
-------------------------------------------

             Summary: Sql. Extend explain output
                 Key: IGNITE-25083
                 URL: https://issues.apache.org/jira/browse/IGNITE-25083
             Project: Ignite
          Issue Type: Task
          Components: sql
    Affects Versions: 3.0
            Reporter: Evgeny Stanilovsky


Check 2 plans, minimally seems some useful information is missing:

check for : c=[COUNT()], ck=[COUNT($1)]

{noformat}
IgniteProject(EXPR$0=[$0]): rowcount = 4.675, cumulative cost = IgniteCost 
[rowCount=63.72, cpu=170.33370339541932, memory=100.6, io=0.0, network=59.2], 
id = 2902
  IgniteProject(EXPR$0=[OR(AND(IS NULL($3), null, IS NOT TRUE(=($5, 0))), 
AND(IS NOT NULL($2), IS NOT TRUE(=($5, 0)), IS NOT NULL($3)), AND(IS TRUE(<($6, 
$5)), null, IS NOT TRUE(=($5, 0)), IS NOT NULL($3), IS NULL($2)))], I=[$3]): 
rowcount = 4.675, cumulative cost = IgniteCost [rowCount=59.045, 
cpu=165.6587033954193, memory=100.6, io=0.0, network=59.2], id = 2901
    IgniteMergeJoin(condition=[=($3, $1)], joinType=[right], variablesSet=[[]], 
leftCollation=[[1 ASC-nulls-first, 0 ASC-nulls-first]], rightCollation=[[0 
ASC-nulls-first]]): rowcount = 4.675, cumulative cost = IgniteCost 
[rowCount=54.370000000000005, cpu=160.9837033954193, memory=100.6, io=0.0, 
network=59.2], id = 2900
      IgniteColocatedSortAggregate(group=[{0, 1}], i=[LITERAL_AGG(true)], 
collation=[[1 ASC-nulls-first, 0 ASC-nulls-first]]): rowcount = 2.7, cumulative 
cost = IgniteCost [rowCount=14.799999999999999, cpu=40.6340855309903, 
memory=41.8, io=0.0, network=28.8], id = 2892
        IgniteExchange(distribution=[single]): rowcount = 3.6, cumulative cost 
= IgniteCost [rowCount=11.2, cpu=37.034085530990296, memory=28.8, io=0.0, 
network=28.8], id = 2891
          IgniteSort(sort0=[$1], sort1=[$0], dir0=[ASC-nulls-first], 
dir1=[ASC-nulls-first]): rowcount = 3.6, cumulative cost = IgniteCost 
[rowCount=7.6, cpu=33.434085530990295, memory=28.8, io=0.0, network=0.0], id = 
2890
            IgniteTableScan(table=[[PUBLIC, INTEGERS]], filters=[IS NOT 
NULL($t0)], projects=[[$t0, $t0]], requiredColumns=[{2}]): rowcount = 3.6, 
cumulative cost = IgniteCost [rowCount=4.0, cpu=16.0, memory=0.0, io=0.0, 
network=0.0], id = 377
      IgniteMergeJoin(condition=[=($0, $1)], joinType=[left], 
variablesSet=[[]], leftCollation=[[0 ASC-nulls-first]], rightCollation=[[0 
ASC-nulls-first]]): rowcount = 4.27, cumulative cost = IgniteCost 
[rowCount=32.6, cpu=92.46961786442898, memory=58.8, io=0.0, network=30.4], id = 
2899
        IgniteExchange(distribution=[single]): rowcount = 4.0, cumulative cost 
= IgniteCost [rowCount=12.0, cpu=28.635532333438686, memory=16.0, io=0.0, 
network=16.0], id = 2894
          IgniteSort(sort0=[$0], dir0=[ASC-nulls-first]): rowcount = 4.0, 
cumulative cost = IgniteCost [rowCount=8.0, cpu=24.635532333438686, 
memory=16.0, io=0.0, network=0.0], id = 2893
            IgniteTableScan(table=[[PUBLIC, INTEGERS]], requiredColumns=[{2}]): 
rowcount = 4.0, cumulative cost = IgniteCost [rowCount=4.0, cpu=4.0, 
memory=0.0, io=0.0, network=0.0], id = 471
        IgniteReduceSortAggregate(rowType=[RecordType(INTEGER $f0, BIGINT c, 
BIGINT ck)], group=[{0}], c=[COUNT()], ck=[COUNT($1)], collation=[[0 
ASC-nulls-first]]): rowcount = 1.8, cumulative cost = IgniteCost 
[rowCount=14.8, cpu=40.63408553099029, memory=42.8, io=0.0, network=14.4], id = 
2898
          IgniteExchange(distribution=[single]): rowcount = 1.8, cumulative 
cost = IgniteCost [rowCount=13.0, cpu=38.83408553099029, memory=42.8, io=0.0, 
network=14.4], id = 2897
            IgniteMapSortAggregate(group=[{0}], c=[COUNT()], ck=[COUNT($1)], 
collation=[[0 ASC-nulls-first]]): rowcount = 1.8, cumulative cost = IgniteCost 
[rowCount=11.2, cpu=37.034085530990296, memory=42.8, io=0.0, network=0.0], id = 
2896
              IgniteSort(sort0=[$0], sort1=[$1], dir0=[ASC-nulls-first], 
dir1=[ASC-nulls-first]): rowcount = 3.6, cumulative cost = IgniteCost 
[rowCount=7.6, cpu=33.434085530990295, memory=28.8, io=0.0, network=0.0], id = 
2895
                IgniteTableScan(table=[[PUBLIC, INTEGERS]], filters=[IS NOT 
NULL($t0)], projects=[[$t0, $t0]]
{noformat}


{noformat}
Project
    fields: [EXPR$0]
    exprs: [EXPR$0]
    est. row count: 1
  Project
      fields: [EXPR$0, I]
      exprs: [OR(AND(IS NULL(I), null, IS NOT TRUE(=(c, 0))), AND(IS NOT 
NULL(i), IS NOT TRUE(=(c, 0)), IS NOT NULL(I)), AND(IS TRUE(<(ck, c)), null, IS 
NOT TRUE(=(c, 0)), IS NOT NULL(I), IS NULL(i))), I]
      est. row count: 1
    MergeJoin
        condition: =(I, $f1)
        joinType: right
        leftCollation: [$f1 ASC, $f0 ASC]
        rightCollation: [$f0 ASC]
        est. row count: 1
      ColocatedSortAggregate
          group: [$f0, $f1]
          aggs: [LITERAL_AGG(true)]
          collation: [$f1 ASC, $f0 ASC]
          est. row count: 1
        Exchange
            distribution: single
            est. row count: 1
          Sort
              collation: [$f1 ASC, $f0 ASC]
              est. row count: 1
            TableScan
                table: [PUBLIC, INTEGERS]
                filters: IS NOT NULL(I)
                fields: [$f0, $f1]
                projects: [I, I]
                est. row count: 1
      MergeJoin
          condition: =(I, $f0)
          joinType: left
          leftCollation: [I ASC]
          rightCollation: [I ASC]
          est. row count: 1
        Exchange
            distribution: single
            est. row count: 1
          Sort
              collation: [I ASC]
              est. row count: 1
            TableScan
                table: [PUBLIC, INTEGERS]
                fields: [I]
                est. row count: 1
        ColocatedSortAggregate
            group: [$f0]
            aggs: [COUNT(), COUNT($f1)]
            collation: [$f0 ASC]
            est. row count: 1
          Exchange
              distribution: single
              est. row count: 1
            Sort
                collation: [$f0 ASC]
                est. row count: 1
              TableScan
                  table: [PUBLIC, INTEGERS]
                  filters: IS NOT NULL(I)
                  fields: [$f0, $f1]
                  projects: [I, I]
                  est. row count: 1
{noformat}





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to