Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A07F2475F32 for ; Wed, 8 Jan 2003 08:38:13 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id CA041475D1C for ; Wed, 8 Jan 2003 08:38:11 -0500 (EST) Received: from klaster.net (ph131.krakow.cvx.ppp.tpnet.pl [217.99.208.131]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 5B9C52B21C; Wed, 8 Jan 2003 14:36:17 +0100 (CET) Message-ID: <3E1C2AA2.3000103@klaster.net> Date: Wed, 08 Jan 2003 14:41:54 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tambet Matiisen Cc: pgsql-sql@postgresql.org Subject: Re: full join in view References: <81132473206F3A46A72BD6116E1A06AE1B14BC@black.aprote.com> In-Reply-To: <81132473206F3A46A72BD6116E1A06AE1B14BC@black.aprote.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/93 X-Sequence-Number: 10958 Tambet Matiisen wrote: > I'm making a report in Crystal Reports, which makes use of full join. > As Crystal Reports does not support full join natively, I created a > view which contains the join and based my report on that view. The > report has also a parameter to filter only subset of rows from view. > My problem is, that when selecting from this view, optimizer never > uses indexes of neither of two tables. > > I understand, that optimizing the filter to the bottom of query tree > may not always give the same result with full join (although it should > in my case). Alternative could be to use function returning a table, > but I doubt I could use this function from Crystal Reports. What other > options I have? > > Tambet Can you add some sql examples - table & index definition, view definition? If your view doesn't contain other views or sub-selects, postgres should use indexes. Tomasz Myrta