Patent ID: 6996557
Filing Date: 2006-02-07
Classification: G06F,Y10S

Abstract:
1. A method of optimizing a query in a computer, the query being performed by the computer to retrieve data from a relational database stored in an electronic storage device coupled to the computer, the method comprising the steps of: (a) receiving a query having a subquery containing a predicate for matching a nullable left-hand-size (LHS) operand to a nullable right-hand-size (RHS) operand, the query predicate presented in the form of “LHS operand=RHS operand OR (LHS operand IS NULL AND RHS operand IS NULL)”; (b) transforming the subquery such that the re-written subquery has a simple predicate LHS=RHS returning TRUE value in a presence of a NULL value in all said operands, thereby enabling an optimizer to allow all access methods; and (c) executing the transformed query in the computer to retrieve data from the relational database.