Package org.apache.derby.iapi.sql.compile

Examples of org.apache.derby.iapi.sql.compile.CostEstimate.rowCount()


      CostEstimate localCE =
        optimizableList.
          getOptimizable(prevPosition).
            getBestAccessPath().
              getCostEstimate();
      prevRowCount = localCE.rowCount();
      prevSingleScanRowCount = localCE.singleScanRowCount();
    }

    /*
    ** If there is no feasible join order, the cost estimate
View Full Code Here


          CostEstimate localCE =
            optimizableList.
              getOptimizable(prevPosition).
                getBestSortAvoidancePath().
                  getCostEstimate();
          prevRowCount = localCE.rowCount();
          prevSingleScanRowCount = localCE.singleScanRowCount();
          prevEstimatedCost =
            currentSortAvoidanceCost.getEstimatedCost() -
            ap.getCostEstimate().getEstimatedCost();
        }
View Full Code Here

      ** number of rows is the number of rows returned by the innermost
      ** optimizable.
      */
      currentCost.setCost(
        currentCost.getEstimatedCost() + ce.getEstimatedCost(),
        ce.rowCount(),
        ce.singleScanRowCount());

      if (curOpt.considerSortAvoidancePath() &&
        requiredRowOrdering != null)
      {
View Full Code Here

        ce = curOpt.getBestSortAvoidancePath().getCostEstimate();

        currentSortAvoidanceCost.setCost(
          currentSortAvoidanceCost.getEstimatedCost() +
            ce.getEstimatedCost(),
          ce.rowCount(),
          ce.singleScanRowCount());
      }

      if (optimizerTrace)
      {
View Full Code Here

    ** of outer rows.  The optimizable may over-ride this assumption.
    */
    // RESOLVE: The following call to memoryUsageOK does not behave
    // correctly if outerCost.rowCount() is POSITIVE_INFINITY; see
    // DERBY-1259.
    if( ! optimizable.memoryUsageOK( estimatedCost.rowCount() / outerCost.rowCount(), maxMemoryPerTable))
    {
      if (optimizerTrace)
      {
        trace(SKIPPING_DUE_TO_EXCESS_MEMORY, 0, 0, 0.0, null);
      }
View Full Code Here

      ce = optimizableList.getOptimizable(bestJoinOrder[i])
          .getTrulyTheBestAccessPath().getCostEstimate();

      finalCostEstimate.setCost(
        finalCostEstimate.getEstimatedCost() + ce.getEstimatedCost(),
        ce.rowCount(),
        ce.singleScanRowCount());
    }

    return finalCostEstimate;
  }
View Full Code Here

    // Get the cost estimate for the child
    // RESOLVE - we will eventually include the cost of the sort
    CostEstimate costEstimate = child.getFinalCostEstimate();

    mb.push(costEstimate.rowCount());
    mb.push(costEstimate.getEstimatedCost());

    mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getSortResultSet",
              ClassName.NoPutResultSet, 9);
View Full Code Here

        newCost *= outerCost.rowCount();
      }

      costEstimate.setCost(
        newCost,
        costEstimate.rowCount() * outerCost.rowCount(),
        costEstimate.singleScanRowCount());

      /*
      ** Choose the lock mode.  If the start/stop conditions are
      ** constant, choose row locking, because we will always match
View Full Code Here

        optimizer.trace(Optimizer.ROW_LOCK_ALL_CONSTANT_START_STOP,
                0, 0, 0.0, null);
      }
      else
      {
        setLockingBasedOnThreshold(optimizer, costEstimate.rowCount());
      }

      optimizer.trace(Optimizer.COST_OF_N_SCANS,
              tableNumber, 0, outerCost.rowCount(), costEstimate);
View Full Code Here

      {
        double singleFetchCost =
            getBaseCostController().getFetchFromRowLocationCost(
                                (FormatableBitSet) null,
                                0);
        cost = singleFetchCost * costEstimate.rowCount();

        costEstimate.setEstimatedCost(
                costEstimate.getEstimatedCost() + cost);

        optimizer.trace(Optimizer.NON_COVERING_INDEX_COST,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.