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
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
I'd run each query multiple times -- before and after disabling mergejoin --
to ensure that all the data is safely in RAM.
On 12/15/2018 02:13 PM, Vijaykumar Jain wrote:
Hey Guys,
I was just playing with exploring joins and plans i came across this
create table t1(a int);
create table t2(a in
Hey Guys,
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;
pgtesting=> analyze t1;
ANALYZE
pgt