Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 47720475F55 for ; Thu, 12 Sep 2002 14:57:18 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 503CF475E71 for ; Thu, 12 Sep 2002 14:57:17 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8CIv7Ko008921; Thu, 12 Sep 2002 14:57:07 -0400 (EDT) To: Stephan Szabo Cc: Gaetano Mendola , pgsql-sql@postgresql.org Subject: Re: Performance inside and outside view ( WAS Re: Select the In-reply-to: <20020912081941.L45896-100000@megazone23.bigpanda.com> References: <20020912081941.L45896-100000@megazone23.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Thu, 12 Sep 2002 08:22:54 -0700" Date: Thu, 12 Sep 2002 14:57:07 -0400 Message-ID: <8920.1031857027@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/110 X-Sequence-Number: 9387 Stephan Szabo writes: > On Thu, 12 Sep 2002, Tom Lane wrote: >> 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. Oh, duh, you're right; I'd missed the DISTINCT ON ... regards, tom lane