mirror of https://github.com/citusdata/citus.git
Merge pull request #1981 from citusdata/faster_execute_subplans
Skip call to ActiveReadableNodeList when there are no subplanspull/1969/head
commit
0303dfc463
|
@ -34,9 +34,17 @@ ExecuteSubPlans(DistributedPlan *distributedPlan)
|
||||||
uint64 planId = distributedPlan->planId;
|
uint64 planId = distributedPlan->planId;
|
||||||
List *subPlanList = distributedPlan->subPlanList;
|
List *subPlanList = distributedPlan->subPlanList;
|
||||||
ListCell *subPlanCell = NULL;
|
ListCell *subPlanCell = NULL;
|
||||||
List *nodeList = ActiveReadableNodeList();
|
List *nodeList = NIL;
|
||||||
bool writeLocalFile = false;
|
bool writeLocalFile = false;
|
||||||
|
|
||||||
|
if (subPlanList == NIL)
|
||||||
|
{
|
||||||
|
/* no subplans to execute */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
nodeList = ActiveReadableNodeList();
|
||||||
|
|
||||||
foreach(subPlanCell, subPlanList)
|
foreach(subPlanCell, subPlanList)
|
||||||
{
|
{
|
||||||
DistributedSubPlan *subPlan = (DistributedSubPlan *) lfirst(subPlanCell);
|
DistributedSubPlan *subPlan = (DistributedSubPlan *) lfirst(subPlanCell);
|
||||||
|
|
Loading…
Reference in New Issue