You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/01/20 01:21:34 UTC

[jira] [Updated] (PHOENIX-1594) Using KeyOnlyFilter for simple query "select count(1) from "
     [ https://issues.apache.org/jira/browse/PHOENIX-1594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Taylor updated PHOENIX-1594:
----------------------------------
    Attachment: PHOENIX-1594.patch

[~jeffreyz] - here's a patch that adds FirstKeyOnlyFilter in more situations. Most of it is just test changes to fix explain plan comparisons where the FirstKeyOnlyFilter is used now but not before. 

Notice for the case you mentioned, only the A column family is projected into the scan and not all column families. We project families rather than individual column qualifiers because we've found HBase performance suffers in this case (~30% if I recall correctly). It's usually faster to just do a next rather than seek to the next column. We do have a hint to override this optimization.

> Using KeyOnlyFilter for simple query "select count(1) from <table>"
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-1594
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1594
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Jeffrey Zhong
>         Attachments: PHOENIX-1594.patch
>
>
> I found that underlying scan for query "select count(1) or count(*) from <table>" still project all columns. 
> It should be fast if we use KeyOnlyFilter for this simple query.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)