some sql like ' select a from t1 intersect select a from t1 '
if t1 has large number rows but has few distinct rows
select distinct a from t1 intersect select distinct a from t1;― this is
faster than origin sql
can postgres do this optimize during plan-queries?
session 1:
create temp table ttt ( a int );
insert into ttt values(3); -- query_id is XXX from
pg_stat_activity
session 2:
create temp table ttt ( a int );
insert into ttt values(3);-- query_id is YYY from
pg_stat_activity
I know temp table h