return index.getScanCostEstimate();
// There is a limit and this index looks to be sorted, so adjust for that
// limit. Otherwise, the scan only cost, which includes all rows, will appear
// too large compared to a limit-aware best plan.
PlanCostEstimator estimator = newEstimator();
estimator.indexScan(index);
estimator.setLimit(limit);
return estimator.getCostEstimate();
}
public CostEstimate estimateCost(GroupScan scan) {