Re: [PERFORM] Planner chooses slow index heap scan despite accurate row estimates

2016-05-27 Thread Tom Lane
Jake Magner writes: > I am trying to insert rows that don't already exist from a temp table into > another table. I am using a LEFT JOIN on all the columns and checking for > nulls in the base table to know which rows to insert. The problem is that > the planner is choosing a nested loop plan whic

[PERFORM] Planner chooses slow index heap scan despite accurate row estimates

2016-05-27 Thread Jake Magner
I am trying to insert rows that don't already exist from a temp table into another table. I am using a LEFT JOIN on all the columns and checking for nulls in the base table to know which rows to insert. The problem is that the planner is choosing a nested loop plan which is very slow over the much