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

From Tom Lane
Subject Re: Query slows when used with view
Date
Msg-id 20080.1570629421@sss.pgh.pa.us
Whole thread Raw
In response to Query slows when used with view  (Yavuz Selim Sertoğlu (ETIYA)<yavuz.sertoglu@etiya.com>)
Responses RE: Query slows when used with view
Re: Query slows when used with view
List pgsql-performance
=?iso-8859-9?Q?Yavuz_Selim_Serto=F0lu_=28ETIYA=29?= <yavuz.sertoglu@etiya.com> writes:
> I have a problem with views. When I use view in my query it really slows down(1.7seconds)
> If I use inside of view and add conditions and joins to it, it is really fast(0.7 milliseconds).
> I have no distinct/group/partition by in view so I have no idea why is this happening.
> I wrote queries and plans below.

Those are not equivalent queries.  Read up on the syntax of FROM;
particularly, that JOIN binds more tightly than comma.

            regards, tom lane



pgsql-performance by date:

Previous
From: Yavuz Selim Sertoğlu (ETIYA)
Date:
Subject: Query slows when used with view
Next
From: Yavuz Selim Sertoğlu (ETIYA)
Date:
Subject: RE: Query slows when used with view