Re: [HACKERS] significant semi join overestimates (with CTEs)

2016-02-23 Thread Robert Haas
On Mon, Feb 22, 2016 at 4:32 AM, Tomas Vondra wrote: > Firstly, we could clamp the join cardinality estimate to the size of > cartesian product, eliminating at least the most obvious over-estimates. > > Secondly, I think it'd be nice to somehow eliminate the sudden

[HACKERS] significant semi join overestimates (with CTEs)

2016-02-21 Thread Tomas Vondra
Hi, while investigating a poor query plan choice, I've noticed suspicious semi join estimates looking like this: -> Nested Loop (cost=35.52..1787.31 rows=281653470 width=566) Buffers: shared hit=9305 -> HashAggregate (cost=34.81..36.81 rows=200 width=32) Group