Release 10.1A: OpenEdge Data Management:
SQL Development

> ## The statement parser

> The statement parser, a component of the SQL engine, performs the initial analysis of an SQL statement. It checks for correct syntax and transforms the statement from a character string into a query tree. The parser also performs several transformations of the query in order to simplify subsequent analysis and optimization steps. Among these transformations are translations of quantified predicates and taking into account references to views.

> ##### Quantified predicates and other subqueries

> In OpenEdge SQL, subqueries are low-cost because they are folded into the query tree as joins. The parser translates subqueries, such as predicates preceded by `ANY` and `ALL`, to an equivalent form that does not contain these keywords. Usually, the new form is a join between the data in the subquery and the data in the remainder of the SQL statement.

> ##### Views

> In OpenEdge SQL, views are low-cost because their definitions in terms of base tables are substituted into the query tree. The initial tree created by the parser treats views as though they were base tables. Before the query can be optimized, the view references must be resolved and applied to the tree. View resolution replaces each view reference with a subtree corresponding to the query expression found in the view definition.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095