Re: AW: Missing constant propagation in planner on hash quals causes join slowdown

2019-12-15 Thread Tom Lane
Hans Buschmann writes: > The planner correctly sets the index conditions (knows that the xx_season > columns are constant), but fails to apply this constantness to the hash > conditions by discarding a constant column in a hash table. Yeah. The reason for this behavior is that, after reconside

AW: Missing constant propagation in planner on hash quals causes join slowdown

2019-11-10 Thread Hans Buschmann
Thanks for looking at it. I think these two queries are equivalent, as shown by the explain. In both cases the index scan only selects tuples with xx_season=3 as shown in both explains: Index Cond: (tmaster.t1_season = 3) Index Cond: (tfact.t2_season = 3) So no tuple ca