The Commons

Back to Results

Patent Title: Method and apparatus for reordering complex SQL queries containing inner and outer join operations

Assignee: IBM
Patent Number: US5680603
Issue Date: 10-21-1997
Application Number:
File Date:10-20-1994


Abstract: A method and apparatus for reordering complex SQL queries containing joins, outer and full outer joins. The method and apparatus first translates the query into a hypergraph representation. Required sets, conflict sets and preserved sets are then generated for the query hypergraph. Using the required sets, a plurality of plans are enumerated, wherein the plans represent associative reorderings of relations in the query. SQL operators are selectively assigned to each of the enumerated plans using the conflict sets and/or preserved sets, so that the results from the plans are identical to the original query. A novel Modified General Outer Join (MGOJ) operator may be assigned to the root of a sub-tree, wherein the MGOJ operator is a compensation operator. The operator assignment is performed recursively for the root of each sub-tree in the plan. One of the enumerated plans (generally the most optimal) is then selected for execution.

Notes:

Link to USPTO

IBM Pledge dated 1/11/2005