Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BC8364760A7 for ; Thu, 12 Sep 2002 10:50:20 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 1F853476082 for ; Thu, 12 Sep 2002 10:50:20 -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 g8CEoNKo007351; Thu, 12 Sep 2002 10:50:23 -0400 (EDT) To: "Gaetano Mendola" Cc: pgsql-sql@postgresql.org Subject: Re: Performance inside and outside view ( WAS Re: Select the max on a field ) In-reply-to: References: <20020912065516.L45340-100000@megazone23.bigpanda.com> Comments: In-reply-to "Gaetano Mendola" message dated "Thu, 12 Sep 2002 16:31:04 +0200" Date: Thu, 12 Sep 2002 10:50:23 -0400 Message-ID: <7350.1031842223@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/104 X-Sequence-Number: 9381 "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 ... regards, tom lane