16. The medium of claim 15 , wherein the one or more annotations for each selected choice comprising: one or more semantically different alternatives to the selected choice that each, if used in the database query language statement, produce the same result; reasons for not performing one or more rewrites of the database query language statement; and information to be displayed to a developer of the database query language statement.
15. A volatile or non-volatile computer readable medium storing a computer program of instructions which, when executed by a processing system, cause the system to perform a method comprising: receiving an database query language statement at an optimizer; evaluating one or more choices in a search space to identify or generate an optimal execution plan for the database query language statement; generating an annotated execution plan from the optimal execution plan by producing one or more annotations to explain one or more reasons for the optimizer selecting a choice over an alternative choice during the act of evaluating the one or more choices, wherein the annotated execution plan is examined for identifying or generating a recommendation for one or more schema changes and the possible statement modification to rewrite the database query language statement.