There are four steps when ALTIBASE HDB executes a query. These steps are as follows:
Parser checks the syntax of SQL text. If no errors are detected in the SQL, Parser generates "Parse Tree" which is used in Validator. Parser does not look up any information in the system tables, and does not access the database.
Validator accesses various system tables in the database to verify that all database objects referenced by the SQL exist, such as tables, columns, views, types, PSMs, etc. If there are no errors, Validator generates "Checked Parse Tree".
After checking validity of the SQL, Optimizer tries to find out the best way to execute the given "Checked Parse Tree", and then it generates "Plan Tree". There are many sophisticated algorithms and strategies in the ALTIBASE HDB optimization process. If you'd like to know more about the optimization in ALTIBASE HDB, you can refer to the "SQL Tuning" section in Administrator's Manual.
The last phase executes the query. Executor executes the SQL using the given Plan Tree.