QUERY PLAN -------------------------------------------------------------------- Hash Join (cost=73.64..76.50 rows=6 width=8) Hash Cond: (tab2.k = tab1.j) -> HashAggregate (cost=36.75..38.75 rows=200 width=4) -> Seq Scan on tab2 (cost=0.00..31.40 rows=2140 width=4) -> Hash (cost=36.75..36.75 rows=11 width=8) -> Seq Scan on tab1 (cost=0.00..36.75 rows=11 width=8) Filter: (j = i) (7 rows)