Bad plan

2018-01-23 Thread Laurent Martelli
Hello all, So I have a view, for which I can select all rows in about 3s (returns ~80k rows), but if I add a where clause on a column, it takes +300s to return the ~8k lines. >From the plan, I see that it expects to return only 1 row and so choose to perform some nested loops. Of course, I did

Re: Bad plan

2018-01-23 Thread Laurent Martelli
2018-01-23 16:18 GMT+01:00 Justin Pryzby <pry...@telsasoft.com>: > On Tue, Jan 23, 2018 at 01:03:49PM +0100, Laurent Martelli wrote: > >> Here is the default plan : > > Can you resend without line breaks or paste a link to explain.depesz? I hope it's better like that. I'

Re: Bad plan

2018-01-23 Thread Laurent Martelli
it ? 2018-01-23 16:38 GMT+01:00 Laurent Martelli <martellilaur...@gmail.com>: > 2018-01-23 16:18 GMT+01:00 Justin Pryzby <pry...@telsasoft.com>: >> On Tue, Jan 23, 2018 at 01:03:49PM +0100, Laurent Martelli wrote: >> >>> Here is the default plan : >> >&