 explain (costs off, nodes off) select count(distinct(b+c)) from (select b, c, d from t_distinct union all select b, c, d from t_distinct); select count(distinct(b+c)) from (select b, c, d from t_distinct union all select b, c, d from t_distinct); 