15. A system for optimization of a query requesting data from a database, the system comprising: a computer having a processor and memory; a search engine for generating a search space comprising only left deep nested loop join trees for returning data requested by the query and traversing the search space to select an optimal left deep nested loop join tree for execution of the query; a transform module for transforming the left deep nested loop join tree selected by the search engine and including one or more outer joins and/or one or more semi-joins into a semantically correct bushy tree structure; and a generator module for generating a query execution plan for returning data requested by the query based on the semantically correct bushy tree structure.
25. The system of claim 15 , further comprising: a module for converting the query into a tree of logical operators.