github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/optimizer/union.result (about) 1 drop database if exists d1; 2 create database d1; 3 use d1; 4 drop table if exists t1; 5 drop table if exists t2; 6 create table t1(c1 int primary key, c2 int, c3 int); 7 create table t2(c1 int, c2 int, c3 int, primary key(c1,c2)); 8 explain select * from t1 union select * from t2; 9 QUERY PLAN 10 Project 11 -> Union 12 -> Project 13 -> Table Scan on d1.t1 14 -> Project 15 -> Table Scan on d1.t2 16 explain select * from t1 union select * from t1; 17 QUERY PLAN 18 Project 19 -> Table Scan on d1.t1 20 explain select * from t2 union select * from t2; 21 QUERY PLAN 22 Project 23 -> Table Scan on d1.t2 24 explain select c1 from t1 group by c1; 25 QUERY PLAN 26 Project 27 -> Table Scan on d1.t1 28 explain select c1 from t2 group by c1; 29 QUERY PLAN 30 Project 31 -> Aggregate 32 Group Key: t2.c1 33 -> Table Scan on d1.t2 34 explain select c1,c2 from t2 group by c1,c2; 35 QUERY PLAN 36 Project 37 -> Table Scan on d1.t2 38 drop database if exists d1;