15. The method of claim 14 , further comprising: defining a subplan, P, in the direct acyclic graph; and determining that the subplan, P, matches a tree pattern, S, of the power hints query language expression if there is a mapping, M, between nodes in the tree pattern, S, and distinct OP nodes in the subplan, P, such that for each leaf node, s, in the tree pattern, S, a mapping of the leaf node, M(s), is a matching leaf node in the subplan, P, and that those are the leaf nodes in the subplan, P.
14. A computer-implemented method for revising an initial query execution plan for a query in a database management system on the computer, comprising: using the computer to perform the following: computing a direct acyclic graph for the query; defining a power hints language where expressions in the power hints language are tree patterns in the acyclic graph annotated with constraints; constraining the query using a power hints language expression that is appended to the query and contains a predicate; enumerating each of the possible query execution plans in the direct acyclic graph; filtering out the possible query execution plans that do not match the power hints language expression; and finding a matching query execution plan have a lowest estimated cost to determine a revised query execution plan, which is a revision of the initial query execution plan for the query.