Re: [External] Re: simple query on why a merge join plan got selected

2018-12-17 Thread Vijaykumar Jain
Thanks a lot Tom, as always :) We generally do not have so many duplicates in production, so maybe this is an edge case but I am happy with the explanation and the code reference for the analysis. I’ll also play with default statistic target to see what changes by increasing the value. On Sun, 16

Re: simple query on why a merge join plan got selected

2018-12-15 Thread Tom Lane
Vijaykumar Jain writes: > I was just playing with exploring joins and plans i came across this > create table t1(a int); > create table t2(a int); > insert into t1 select (x % 10) from generate_series(1, 10) x; > insert into t2 select (x % 100) from generate_series(1, 10) x; > ... > select