Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 27532200D6C for ; Wed, 29 Nov 2017 00:47:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 25BA9160BE7; Tue, 28 Nov 2017 23:47:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6C8F7160C15 for ; Wed, 29 Nov 2017 00:47:04 +0100 (CET) Received: (qmail 56313 invoked by uid 500); 28 Nov 2017 23:47:03 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 56301 invoked by uid 99); 28 Nov 2017 23:47:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2017 23:47:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D45D9C0A7C for ; Tue, 28 Nov 2017 23:47:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.011 X-Spam-Level: X-Spam-Status: No, score=-99.011 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KB_WAM_FROM_NAME_SINGLEWORD=0.2, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9_IFWyirexzs for ; Tue, 28 Nov 2017 23:47:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 87B345F29B for ; Tue, 28 Nov 2017 23:47:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CD010E2567 for ; Tue, 28 Nov 2017 23:47:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 48351241CA for ; Tue, 28 Nov 2017 23:47:00 +0000 (UTC) Date: Tue, 28 Nov 2017 23:47:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4288) Indexes not used when ordering by primary key MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Nov 2017 23:47:05 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269735#comment-16269735 ] ASF GitHub Bot commented on PHOENIX-4288: ----------------------------------------- Github user JamesRTaylor commented on the issue: https://github.com/apache/phoenix/pull/281 Also, please attach a patch file as described [here](https://phoenix.apache.org/contributing.html#Local_Git_workflow) and click the Submit Patch button on the JIRA so we can get a test run with this patch to confirm there are no regressions. > Indexes not used when ordering by primary key > --------------------------------------------- > > Key: PHOENIX-4288 > URL: https://issues.apache.org/jira/browse/PHOENIX-4288 > Project: Phoenix > Issue Type: Sub-task > Reporter: Marcin Januszkiewicz > Assignee: Maryann Xue > Labels: CostBasedOptimization > > We have a table > CREATE TABLE t ( > rowkey VARCHAR PRIMARY KEY, > c1 VARCHAR, > c2 VARCHAR > ) > which we want to query by doing partial matches on c1, and keep the ordering of the source table: > SELECT rowkey, c1, c2 FROM t where c1 LIKE 'X0%' ORDER BY rowkey; > We expect most queries to select a small subset of the table, so we create an index to speed up searches: > CREATE LOCAL INDEX t_c1_ix ON t (c1); > However, this index will not be used since Phoenix will always choose not to resort the data. > In our actual use case, adding index hints is not a practical solution. > See also discussion at: > https://lists.apache.org/thread.html/26ab58288eb811d2f074c3f89067163d341e5531fb581f3b2486cf43@%3Cuser.phoenix.apache.org%3E -- This message was sent by Atlassian JIRA (v6.4.14#64029)