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

James Taylor commented on PHOENIX-2714:
---------------------------------------

Good catch, [~maryannxue]. We need to get 4.7 out, so I think improvements can 
wait until 4.8 (but it's of course open for discussion). Some other 
improvements include:
- exposing getEstimatedRowCount() and getEstimatedByteCount() in QueryPlan (or 
maybe StatementPlan even). For the union and the join query plans, we could be 
smart about the way we add it up.
- taking into account point lookups and only adding a single blocks worth of 
bytes (as the entire guidepost bytes would not be scanned).
- taking into account the additional column families that are being scanned as 
well. We currently only add the guideposts bytes from the one being used to 
parallelize.

[~lhofhansl] may have other ideas too.

> Correct byte estimate in BaseResultIterators and expose as interface
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-2714
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2714
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>              Labels: statistics
>             Fix For: 4.8.0
>
>
> The bytes are accumulated even if the range intersect is empty (produces a 
> null scan).
> {code}
>                 while (guideIndex < gpsSize && 
> (currentGuidePost.compareTo(endKey) <= 0 || endKey.length == 0)) {
>                     Scan newScan = scanRanges.intersectScan(scan, 
> currentKeyBytes, currentGuidePostBytes, keyOffset,
>                             false);
>                     estimatedRows += gps.getRowCounts().get(guideIndex);
>                     estimatedSize += gps.getByteCounts().get(guideIndex);
>                     scans = addNewScan(parallelScans, scans, newScan, 
> currentGuidePostBytes, false, regionLocation);
>                     currentKeyBytes = currentGuidePost.copyBytes();
>                     currentGuidePost = PrefixByteCodec.decode(decoder, input);
>                     currentGuidePostBytes = currentGuidePost.copyBytes();
>                     guideIndex++;
>                 }
> {code}



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

Reply via email to