Re: Query slows when used with view

Jeff Janes <[email protected]> Wed, 9 Oct 2019 11:24:00 -0400
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <CAMkU=1xgK1pWKFssxOW8unAhvJdA6ub_xcFcCNzUdBGGQKOEYA@mail.gmail.com>
On Wed, Oct 9, 2019 at 10:56 AM Yavuz Selim Sertoğlu (ETIYA) <
[email protected]> wrote:

> Thanks for the reply Tom,
>
> Sorry, I couldn't understand. I just copied inside of view and add
> conditions from query that runs with view.
> The comma parts are the same in two queries, one is inside of view the
> other is in the query.
>

When you join to a view, the view sticks together, as if they were all in
parentheses.   But when you substitute the text of a view into another
query, then they are all on the same level and can be parsed differently.

Consider the difference between "1+1 * 3", and "(1+1) * 3"

Cheers,

Jeff