Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 656 invoked from network); 17 Dec 2005 22:04:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Dec 2005 22:04:58 -0000 Received: (qmail 70905 invoked by uid 500); 17 Dec 2005 22:04:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70885 invoked by uid 500); 17 Dec 2005 22:04:57 -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 70876 invoked by uid 99); 17 Dec 2005 22:04:56 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2005 14:04:56 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 94B7DCB for ; Sat, 17 Dec 2005 23:04:35 +0100 (CET) Message-ID: <734157341.1134857075607.JavaMail.jira@ajax.apache.org> Date: Sat, 17 Dec 2005 23:04:35 +0100 (CET) From: "Satheesh Bandaram (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-772) Handle pushing IN predicates into UNIONs. This would allow use of index if present improving performance. In-Reply-To: <827220178.1134856954745.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-772?page=all ] Satheesh Bandaram updated DERBY-772: ------------------------------------ Attachment: DERBY-772.patch > Handle pushing IN predicates into UNIONs. This would allow use of index if present improving performance. > --------------------------------------------------------------------------------------------------------- > > Key: DERBY-772 > URL: http://issues.apache.org/jira/browse/DERBY-772 > Project: Derby > Type: Sub-task > Components: SQL > Versions: 10.0.2.0, 10.1.2.1, 10.2.0.0 > Environment: generic > Reporter: Satheesh Bandaram > Fix For: 10.2.0.0, 10.1.2.2 > Attachments: DERBY-772.patch > > While fix for DERBY-649 allows pushing binary predicates into SELECT statements that are underneath a UNOIN, it would also be good to allow IN operations to be pushed. Derby can rewrite IN operations in a way to allow use of index, if present. > Derby currently rewrites: REF IN (1, 2, 3) to REF >=1 and REF <=3 and hence would allow use of index on REF, if present. Pushing this predicate into Union would allow use of index on REF for queries like: > Select * from > (SELECT REF, NAME from T1 UNION ALL SELECT REF, NAME from t2) > where REF IN (1,2,3) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira