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 2016/01/08 01:05:39 UTC
[jira] [Commented] (PHOENIX-1428) Keep scanner open on server and
pace by client instead of spooling
[ https://issues.apache.org/jira/browse/PHOENIX-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15088435#comment-15088435 ]
James Taylor commented on PHOENIX-1428:
---------------------------------------
Thanks for the patch, [~samarthjain]. I believe we also do wrapping with a SpoolResultIterator in AggregatePlan as well which we need to handle (maybe I missed that in your patch?):
{code}
private ParallelIteratorFactory wrapParallelIteratorFactory () {
ParallelIteratorFactory innerFactory;
QueryServices services = context.getConnection().getQueryServices();
if (groupBy.isEmpty() || groupBy.isOrderPreserving()) {
innerFactory = new SpoolingResultIterator.SpoolingResultIteratorFactory(services);
} else {
innerFactory = new OrderingResultIteratorFactory(services);
}
if (parallelIteratorFactory == null) {
return innerFactory;
}
// wrap any existing parallelIteratorFactory
return new WrappingResultIteratorFactory(innerFactory, parallelIteratorFactory);
}
{code}
Also, should the ScanUtil.isPacingScannersPossible() method call isRenewingLeasesEnabled too, as the feature may be disabled.
> Keep scanner open on server and pace by client instead of spooling
> ------------------------------------------------------------------
>
> Key: PHOENIX-1428
> URL: https://issues.apache.org/jira/browse/PHOENIX-1428
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: Samarth Jain
> Labels: SFDC
> Attachments: PHOENIX-1428.patch
>
>
> Instead of spooling a batch of results for all chunked scans to the client, keep the scan open and pace it through pre-fetching. This will perform much better for a full table scan with a LIMIT = 1, as this case currently will run a scan for every guidepost, each returning a single row.
> [~lhofhansl]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)