Re: Query slows when used with view - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Query slows when used with view
Date
Msg-id CAMkU=1xgK1pWKFssxOW8unAhvJdA6ub_xcFcCNzUdBGGQKOEYA@mail.gmail.com
Whole thread Raw
In response to RE: Query slows when used with view  (Yavuz Selim Sertoğlu (ETIYA)<yavuz.sertoglu@etiya.com>)
Responses Re: Query slows when used with view  (Michael Lewis <mlewis@entrata.com>)
List pgsql-performance


On Wed, Oct 9, 2019 at 10:56 AM Yavuz Selim Sertoğlu (ETIYA) <yavuz.sertoglu@etiya.com> 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

pgsql-performance by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Query slows when used with view
Next
From: Michael Lewis
Date:
Subject: Re: Query slows when used with view