Examples of rowCount()


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

        double singleFetchCost =
            getBaseCostController().getFetchFromRowLocationCost(
                                (FormatableBitSet) null,
                                0);

        cost = singleFetchCost * costEstimate.rowCount();

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

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

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

       */
      if (extraQualifierSelectivity != 1.0d)
      {
        costEstimate.setCost(
            costEstimate.getEstimatedCost(),
            costEstimate.rowCount() * extraQualifierSelectivity,
            costEstimate.singleScanRowCount() * extraQualifierSelectivity);

        optimizer.trace(Optimizer.COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY,
                tableNumber, 0, 0.0, costEstimate);
      }
View Full Code Here

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

      ** conglomerate is a 1 row result set when costing nested
      ** loop.  (eg, we will find at most 1 match when probing
      ** the hash table.)
      */
      double newCost = costEstimate.getEstimatedCost();
      double rowCount = costEstimate.rowCount();

      /*
      ** RESOLVE - If there is a unique index on the joining
      ** columns, the number of matching rows will equal the
      ** number of outer rows, even if we're not considering the
View Full Code Here

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

      // don't factor in extraNonQualifierSelectivity in case of oneRowResultSetForSomeConglom
      // because "1" is the final result and the effect of other predicates already considered
      // beetle 4787
      else if (extraNonQualifierSelectivity != 1.0d)
      {
        rc = oneRowResultSetForSomeConglom ? costEstimate.rowCount() :
                      costEstimate.rowCount() * extraNonQualifierSelectivity;
        src = costEstimate.singleScanRowCount() * extraNonQualifierSelectivity;
      }
      if (rc != -1) // changed
      {
View Full Code Here

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

      // because "1" is the final result and the effect of other predicates already considered
      // beetle 4787
      else if (extraNonQualifierSelectivity != 1.0d)
      {
        rc = oneRowResultSetForSomeConglom ? costEstimate.rowCount() :
                      costEstimate.rowCount() * extraNonQualifierSelectivity;
        src = costEstimate.singleScanRowCount() * extraNonQualifierSelectivity;
      }
      if (rc != -1) // changed
      {
        costEstimate.setCost(costEstimate.getEstimatedCost(), rc, src);
View Full Code Here

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

        CostEstimate leftCostEstimate = leftResultSet.getCostEstimate();
        CostEstimate rightCostEstimate = rightResultSet.getCostEstimate();
        // The cost is the sum of the two child costs plus the cost of sorting the union.
        costEstimate.setCost( leftCostEstimate.getEstimatedCost() + rightCostEstimate.getEstimatedCost(),
                              getRowCountEstimate( leftCostEstimate.rowCount(),
                                                   rightCostEstimate.rowCount()),
                              getSingleScanRowCountEstimate( leftCostEstimate.singleScanRowCount(),
                                                             rightCostEstimate.singleScanRowCount()));

        return costEstimate;
    } // End of estimateCost
View Full Code Here

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

    CostEstimate rightCE = rightResultSet.getFinalCostEstimate();

    finalCostEstimate = getNewCostEstimate();
    finalCostEstimate.setCost(
      leftCE.getEstimatedCost() + rightCE.getEstimatedCost(),
      getRowCountEstimate(leftCE.rowCount(), rightCE.rowCount()),
      getSingleScanRowCountEstimate(leftCE.singleScanRowCount(),
        rightCE.singleScanRowCount()));

    return finalCostEstimate;
  }
View Full Code Here

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

                              outerCost,
                              rowOrdering);
      /* Copy child cost to this node's cost */
      costEstimate.setCost(
              childCost.getEstimatedCost(),
              childCost.rowCount(),
              childCost.singleScanRowCount());


      // Note: we don't call "optimizer.considerCost()" here because
      // a) the child will make that call as part of its own
View Full Code Here

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

      /* Copy child cost to this node's cost */
      childCost = childResult.costEstimate;

      costEstimate.setCost(
              childCost.getEstimatedCost(),
              childCost.rowCount(),
              childCost.singleScanRowCount());

      /* Note: Prior to the fix for DERBY-781 we had calls here
       * to set the cost estimate for BestAccessPath and
       * BestSortAvoidancePath to equal costEstimate.  That used
View Full Code Here

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

    ** table. Even if this started as a right outer join, it will
    ** have been transformed to a left outer join by this point.
    */
    CostEstimate outerCost = getLeftResultSet().getCostEstimate();

    if (costEstimate.rowCount() < outerCost.rowCount())
    {
      costEstimate.setCost(costEstimate.getEstimatedCost(),
                 outerCost.rowCount(),
                 outerCost.rowCount());
    }
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.