Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 206DED3CE for ; Mon, 26 Nov 2012 14:20:59 +0000 (UTC) Received: (qmail 33954 invoked by uid 500); 26 Nov 2012 14:20:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 33839 invoked by uid 500); 26 Nov 2012 14:20:58 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 33816 invoked by uid 99); 26 Nov 2012 14:20:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 14:20:58 +0000 Date: Mon, 26 Nov 2012 14:20:58 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <1455086896.22813.1353939658238.JavaMail.jiratomcat@arcas> In-Reply-To: <1901621400.22801.1353939298165.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (DERBY-6004) Make it possible for table functions to declare that they return sorted results and make the optimizer exploit this information. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503794#comment-13503794 ] Rick Hillegas commented on DERBY-6004: -------------------------------------- One issue we would want to consider is what to do if the table function lies. With restricted table functions, the restriction is redundantly applied by Derby outside the table function, so Derby returns correct results even when the table function lies. However, part of what we want to achieve with ordered results is to eliminate unnecessary sort nodes. One solution to this problem would be to attach a filter to the result stream of the table function. The filter would raise an exception if it encountered an out-of-order tuple. > Make it possible for table functions to declare that they return sorted results and make the optimizer exploit this information. > -------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-6004 > URL: https://issues.apache.org/jira/browse/DERBY-6004 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.10.0.0 > Reporter: Rick Hillegas > > A derby-dev discussion has highlighted the need for table functions to return sorted results which the optimizer can exploit. See http://old.nabble.com/Have-Derby-Network-Server-having-an-out-of-memory-%28PermGen%29-to34704415.html#a34706722 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira