Le 04/09/2019 à 09:04, Arnaud L. a écrit :
> Le 03/09/2019 à 15:43, Tom Lane a écrit :
>> The planner should be able to do better than that, given up-to-date
>> statistics on the "nodes" column.
>
> Tom, I can confirm that with up to date statistics the planner is still
> lost.
> I did a REINDEX to rule out a broken index and the estimate is still in
> the 100k+ range.
Setting STATISTICS target to 10.000 on the nodes column and re-analyzing
did not help either. Estimates are still ~1.4M rows when result is 1 row.
Regards
--
Arnaud