Re: materialization blocks hash join

2020-03-30 Thread Tom Lane
Tomas Vondra writes: > That's because eqjoinsel_inner won't have any statistics for either side > of the join, so it'll use default ndistinct values (200), resulting in > estimate of 0.5% for the join condition. Right. > But this should not affect the choice of join algorithm, I think, > because

Re: materialization blocks hash join

2020-03-30 Thread Tomas Vondra
On Mon, Mar 30, 2020 at 06:14:42PM +0200, Pavel Stehule wrote: po 30. 3. 2020 v 18:06 odesílatel Pavel Stehule napsal: Hi when I was in talk with Silvio Moioli, I found strange hash join. Hash was created from bigger table. https://www.postgresql.org/message-id/79dd683d-3296-1b21-ab4a-28fdc

Re: materialization blocks hash join

2020-03-30 Thread Pavel Stehule
po 30. 3. 2020 v 18:06 odesílatel Pavel Stehule napsal: > Hi > > when I was in talk with Silvio Moioli, I found strange hash join. Hash was > created from bigger table. > > > https://www.postgresql.org/message-id/79dd683d-3296-1b21-ab4a-28fdc2d98807%40suse.de > > Now it looks so materialized CTE

materialization blocks hash join

2020-03-30 Thread Pavel Stehule
Hi when I was in talk with Silvio Moioli, I found strange hash join. Hash was created from bigger table. https://www.postgresql.org/message-id/79dd683d-3296-1b21-ab4a-28fdc2d98807%40suse.de Now it looks so materialized CTE disallow hash create table bigger(a int); create table smaller(a int);