×

System and method for forcing a query execution plan

  • US 7,464,071 B2
  • Filed: 04/28/2005
  • Issued: 12/09/2008
  • Est. Priority Date: 04/28/2005
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for forcing a query execution plan, the method comprising:

  • receiving a suggested execution plan;

    generating a hint tree that is a structural representation of the suggested execution plan;

    generating a plurality of execution plans; and

    performing a guided query optimization in which execution plans that do not match the suggested execution plan are eliminated as candidates such that the guided query optimization generates a resulting execution plan that matches the suggested execution plan or a determination that the suggested execution plan is invalid, guided query optimization comprising(a) setting a parent node to be a root node of an execution plan tree;

    (b) generating a possible set of child nodes of the parent node;

    (c) comparing the possible set of child nodes to a corresponding set of child nodes in the hint tree, and(d) if the possible set of child nodes does not match the corresponding set of child nodes in the hint tree, then;

    if there is another possible set of child nodes, then returning to step (b);

    if there is no other possible set of child nodes, then determining that the hint tree is invalid;

    (e) if the set of possible child nodes matches the corresponding set of child nodes in the hint tree, then;

    if there is a remaining non-leaf node in the execution plan tree, then setting the parent node to be the remaining non-leaf node and returning to step (b); and

    if there is no remaining non-leaf node in the execution plan tree, then generating the resulting execution plan in accordance with the execution plan tree in its current form.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×