Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2B72F47616E for ; Thu, 12 Sep 2002 11:22:53 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id B902E4760A7 for ; Thu, 12 Sep 2002 11:22:52 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4C98FD600; Thu, 12 Sep 2002 08:22:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 3E4165C02; Thu, 12 Sep 2002 08:22:54 -0700 (PDT) Date: Thu, 12 Sep 2002 08:22:54 -0700 (PDT) From: Stephan Szabo To: Tom Lane Cc: Gaetano Mendola , Subject: Re: Performance inside and outside view ( WAS Re: Select the In-Reply-To: <7350.1031842223@sss.pgh.pa.us> Message-ID: <20020912081941.L45896-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/105 X-Sequence-Number: 9382 On Thu, 12 Sep 2002, Tom Lane wrote: > "Gaetano Mendola" writes: > > Yes that's right it's help me, > > but here the optimizer have some problems: > > What's the datatype of id_user, and why are you quoting the compared > constant in some cases but not others? I don't think the difference > has anything to do with the view here ... At least in current sources it would, since it can't push down the clause (unless I'm misreading subquery_is_pushdown_safe and the comment) through the distinct on.