Examples of singleScanRowCount()


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

      }

      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
      ** the same row.  If they are not constant (i.e. they include
View Full Code Here

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

         */
        if (oneRowResultSetForSomeConglom && costEstimate.rowCount() <= 1)
        {
          costEstimate.setCost(costEstimate.getEstimatedCost() * 2,
                     costEstimate.rowCount() + 2,
                     costEstimate.singleScanRowCount() + 2);
        }
      }

      optimizer.trace(Optimizer.COST_OF_CONGLOMERATE_SCAN1,
              tableNumber, 0, 0.0, cd);
View Full Code Here

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

               scanCostAfterSelectivity(costEstimate.getEstimatedCost(),
                            initialPositionCost,
                            statStartStopSelectivity,
                            oneRowResultSetForSomeConglom),
               costEstimate.rowCount() * statStartStopSelectivity,
               costEstimate.singleScanRowCount() *
               statStartStopSelectivity);
        optimizer.trace(Optimizer.COST_INCLUDING_STATS_FOR_INDEX,
                tableNumber, 0, 0.0, costEstimate);

      }
View Full Code Here

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

             scanCostAfterSelectivity(costEstimate.getEstimatedCost(),
                          initialPositionCost,
                          extraFirstColumnSelectivity,
                          oneRowResultSetForSomeConglom),
             costEstimate.rowCount() * extraFirstColumnSelectivity,
             costEstimate.singleScanRowCount() * extraFirstColumnSelectivity);
         
          optimizer.trace(Optimizer.COST_INCLUDING_EXTRA_1ST_COL_SELECTIVITY,
                  tableNumber, 0, 0.0, costEstimate);
        }

View Full Code Here

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

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

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

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

      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.singleScanRowCount()

        optimizer.trace(Optimizer.COST_INCLUDING_EXTRA_QUALIFIER_SELECTIVITY,
                tableNumber, 0, 0.0, costEstimate);
      }

      singleScanRowCount = costEstimate.singleScanRowCount();

      /*
      ** Let the join strategy decide whether the cost of the base
      ** scan is a single scan, or a scan per outer row.
      ** NOTE: In this case we only want to multiply against the
View Full Code Here

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

      }

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


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

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

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

    finalCostEstimate.add(rightCE, finalCostEstimate);
    return finalCostEstimate;
  }
View Full Code Here

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

                  rowOrdering);

    costEstimate = getCostEstimate(optimizer);
    costEstimate.setCost(childCost.getEstimatedCost(),
               childCost.rowCount(),
               childCost.singleScanRowCount());


    /*
    ** No need to use estimateCost on join strategy - that has already
    ** been done on the child.
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.