Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 82980 invoked from network); 12 Nov 2008 11:39:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2008 11:39:31 -0000 Received: (qmail 5334 invoked by uid 500); 12 Nov 2008 11:39:38 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 5305 invoked by uid 500); 12 Nov 2008 11:39:37 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 5294 invoked by uid 99); 12 Nov 2008 11:39:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2008 03:39:37 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2008 11:38:16 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L0E3n-0000e0-9y for derby-user@db.apache.org; Wed, 12 Nov 2008 03:38:59 -0800 Message-ID: <20458631.post@talk.nabble.com> Date: Wed, 12 Nov 2008 03:38:59 -0800 (PST) From: Reda134 To: derby-user@db.apache.org Subject: Re: Derby optimizer for Table Function In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: reda134@gmail.com References: <20456636.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much for your reply:) Can you please explain me what derby developpers mean exactly with "repeatable table functions" and "read once Streams" ? Many thanks in advance. Knut Anders Hatlen wrote: > > Reda134 writes: > >> Hi all, >> The Derby devoloppers mentions in the documentation of table functions, >> that >> the optimizer takes 2 Assumtions : >> >> 1 - It Assumes by default that table functions are repeatable and thus >> place >> them in the inner slot of a join. >> >> 2 - It Assumes by default that table functions are expensice and thus >> place >> them in the outer slot of a join. >> >> Is this not paradoxal ?? Or i get it wrong ?? > > I assume you're talking about this section of the developer's guide: > http://db.apache.org/derby/docs/10.4/devguide/cdevspecialtfoptimizer.html > > The clue here is that it doesn't say "thus place them in the > [outer/inner] slot", but rather that it is _likely_ that the optimizer > will place the table function in an outer slot and that the optimizer > _can_ place it in an inner slot. If you for example join two table > functions, only one of them can be in the outer slot. The other one will > go in the inner slot. If none of them can go in the inner slot because > they are not repeatable, one of them will be stored in a temporary table > which can go in the inner slot. > > -- > Knut Anders > > -- View this message in context: http://www.nabble.com/Derby-optimizer-for-Table-Function-tp20456636p20458631.html Sent from the Apache Derby Users mailing list archive at Nabble.com.