Re: Query slows when used with view

Tom Lane <[email protected]> Wed, 09 Oct 2019 09:57:01 -0400
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <[email protected]>
=?iso-8859-9?Q?Yavuz_Selim_Serto=F0lu_=28ETIYA=29?= <[email protected]> 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