[jira] [Commented] (PHOENIX-1594) Using KeyOnlyFilter for simple query "select count(1) from "

Sat, 17 Jan 2015 11:46:38 -0800

    [ 
https://issues.apache.org/jira/browse/PHOENIX-1594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14281507#comment-14281507
 ] 

Jeffrey Zhong commented on PHOENIX-1594:
----------------------------------------

It seems that's not the case. Here is the scan in 
UngroupedAggregateRegionObserver#doPostScannerOpen() call. You can see the 
query projects all columns in the first column family and we don't turn off 
cacheBlocks either.

{noformat}
scan 
{"timeRange":[0,305],"batch":-1,"startRow":"000000000000001","stopRow":"000000000000002",
"loadColumnFamiliesOnDemand":true,"totalColumns":1,"cacheBlocks":true,
"families":{"A":["ALL"]},"maxResultSize":-1,"maxVersions":1,"caching":1000}
{noformat}

In the aggregator, I can see the passed in Tuple has two KVs:
{noformat}
[000000000000002/A:UNIQUE_USER_COUNT/300/Put/vlen=4/mvcc=7, 
000000000000002/A:_0/300/Put/vlen=0/mvcc=7]
{noformat}

> 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
>
> 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)

Reply via email to