drop table if exists a;
drop table if exists b;
drop type if exists r;

create type r as (id int, v bigint);
select
	(i, i::bigint*i)::r as idv
	into a
from
	generate_series(1,100000) i;

select * into b from a;

create unique index on a (idv);
create unique index on b (idv);

vacuum;
analyze;

set max_parallel_workers = 0;
set max_parallel_workers_per_gather = 0;


explain analyze
select
	a.idv, b.idv
from
	a, b
where
	a.idv = b.idv;
