Re: Query became very slow after 9.6 -> 10 upgrade

2017-11-23 Thread Dmitry Shalashov
We tried to apply the patch on 10.1 source, but something is wrong it seems: patch -p1 < ../1.patch (Stripping trailing CRs from patch; use --binary to disable.) patching file src/backend/optimizer/plan/analyzejoins.c (Stripping trailing CRs from patch; use --binary to disable.) patching file src/

Re: Query became very slow after 9.6 -> 10 upgrade

2017-11-22 Thread Tom Lane
Dmitry Shalashov writes: > Turns out we had not 9.6 but 9.5. I'd managed to reproduce the weird planner behavior locally in the regression database: regression=# create table foo (f1 int[], f2 int); CREATE TABLE regression=# explain select * from tenk1 where unique2 in (select distinct unnest(f