Examples of updateBestPlanMap()


Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

      Optimizable pullMe =
        optimizableList.getOptimizable(
                  proposedJoinOrder[joinPosition]);
      pullMe.pullOptPredicates(predicateList);
      if (reloadBestPlan)
        pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);
      proposedJoinOrder[joinPosition] = -1;
      if (joinPosition == 0) break;
    }
    currentCost.setCost(0.0d, 0.0d, 0.0d);
    currentSortAvoidanceCost.setCost(0.0d, 0.0d, 0.0d);
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

    ** because 'reloading best plans' involves walking the
    ** entire subtree of _every_ Optimizable in the list, which
    ** can be expensive if there are deeply nested subqueries.
    */
    if (reloadBestPlan)
      pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);

    /* Mark current join position as unused */
    proposedJoinOrder[joinPosition] = -1;

    /* If we didn't advance the join position then the optimizable
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

      // then we know that the most recent access path (represented
      // by "current" access path) was not the best.
      if (curOpt.getBestAccessPath().getCostEstimate().compare(
        curOpt.getCurrentAccessPath().getCostEstimate()) != 0)
      {
        curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
      }
      else if (curOpt.getBestAccessPath().getCostEstimate().rowCount() <
        curOpt.getCurrentAccessPath().getCostEstimate().rowCount())
      {
        // If currentCost and bestCost have the same cost estimate
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

        // If currentCost and bestCost have the same cost estimate
        // but currentCost has been rejected because of memory, we
        // still need to revert the plans.  In this case the row
        // count for currentCost will be greater than the row count
        // for bestCost, so that's what we just checked.
        curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
      }
    }

    /* If we needed to revert plans for curOpt, we just did it above.
     * So we no longer need to keep the previous best plan--and in fact,
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

    /* If we needed to revert plans for curOpt, we just did it above.
     * So we no longer need to keep the previous best plan--and in fact,
     * keeping it can lead to extreme memory usage for very large
     * queries.  So delete the stored plan for curOpt. DERBY-1315.
     */
    curOpt.updateBestPlanMap(FromTable.REMOVE_PLAN, curOpt);

    /*
    ** When all the access paths have been looked at, we know what the
    ** cheapest one is, so remember it.  Only do this if a cost estimate
    ** has been set for the best access path - one will not have been
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

        ** because 'reloading best plans' involves walking the
        ** entire subtree of _every_ Optimizable in the list, which
        ** can be expensive if there are deeply nested subqueries.
        */
        if (reloadBestPlan)
          pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);

        /* Mark current join position as unused */
        proposedJoinOrder[joinPosition] = -1;
      }

View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

      Optimizable pullMe =
        optimizableList.getOptimizable(
                  proposedJoinOrder[joinPosition]);
      pullMe.pullOptPredicates(predicateList);
      if (reloadBestPlan)
        pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);
      proposedJoinOrder[joinPosition] = -1;
      if (joinPosition == 0) break;
    }
    currentCost.setCost(0.0d, 0.0d, 0.0d);
    currentSortAvoidanceCost.setCost(0.0d, 0.0d, 0.0d);
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

      // then we know that the most recent access path (represented
      // by "current" access path) was not the best.
      if (curOpt.getBestAccessPath().getCostEstimate().compare(
        curOpt.getCurrentAccessPath().getCostEstimate()) != 0)
      {
        curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
      }
      else if (curOpt.getBestAccessPath().getCostEstimate().rowCount() <
        curOpt.getCurrentAccessPath().getCostEstimate().rowCount())
      {
        // If currentCost and bestCost have the same cost estimate
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

        // If currentCost and bestCost have the same cost estimate
        // but currentCost has been rejected because of memory, we
        // still need to revert the plans.  In this case the row
        // count for currentCost will be greater than the row count
        // for bestCost, so that's what we just checked.
        curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
      }
    }

    /* If we needed to revert plans for curOpt, we just did it above.
     * So we no longer need to keep the previous best plan--and in fact,
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Optimizable.updateBestPlanMap()

    /* If we needed to revert plans for curOpt, we just did it above.
     * So we no longer need to keep the previous best plan--and in fact,
     * keeping it can lead to extreme memory usage for very large
     * queries.  So delete the stored plan for curOpt. DERBY-1315.
     */
    curOpt.updateBestPlanMap(FromTable.REMOVE_PLAN, curOpt);

    /*
    ** When all the access paths have been looked at, we know what the
    ** cheapest one is, so remember it.  Only do this if a cost estimate
    ** has been set for the best access path - one will not have been
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.