1. A method comprising: receiving a database query language statement at anoptimizer; evaluating choices in a search space to generate an execution plan for the statement; and producing annotations to record one or more reasons for selecting each choice while generating the execution plan.