10. A computer program, stored on a tangible storage medium, for use in processing a database query, the query including an expression, the computer program including executable instructions that cause a computer to: perform expression optimization on the expression; perform further query optimization to produce a result; save the result in a machine memory; where the expression includes a sub-expression (“SE”), where expression optimization is performed before further query optimization, and where the computer program includes executable instructions that cause a computer to: represent the query as a tree structure; represent the expression in the tree structure as a parent node having a first child node and a second child node; where the first child node represents the sub-expression; where the second child node represents the portion of the expression that is not the sub-expression; and where the parent node represents an operation between the first child node and the second child node; determine that the second child node represents the constant 0 and that the parent node represents an arithmetic operation selected from the group consisting of addition and subtraction; and in response, remove the parent node and its children from the tree structure and insert the first child node in its place.
10. A computer program, stored on a tangible storage medium, for use in processing a database query, the query including an expression, the computer program including executable instructions that cause a computer to: perform expression optimization on the expression; perform further query optimization to produce a result; save the result in a machine memory; where the expression includes a sub-expression (“SE”), where expression optimization is performed before further query optimization, and where the computer program includes executable instructions that cause a computer to: represent the query as a tree structure; represent the expression in the tree structure as a parent node having a first child node and a second child node; where the first child node represents the sub-expression; where the second child node represents the portion of the expression that is not the sub-expression; and where the parent node represents an operation between the first child node and the second child node; determine that the second child node represents the constant 0 and that the parent node represents an arithmetic operation selected from the group consisting of addition and subtraction; and in response, remove the parent node and its children from the tree structure and insert the first child node in its place. 13. The computer program of claim 10 , where further query optimization includes: determining a satisfiability of the database query.