1. A method for executing an extended markup language (XML) database query, the method comprising: compiling the XML database query to provide at least two alternative execution plans, wherein, upon execution, the at least two alternate execution plans provide a same response to the XML database query; selecting one of the at least two alternative execution plans at runtime; and executing the selected execution plan to perform the XML database query; wherein said selecting comprises a switch dynamically selecting one of the at least two alternative plans, wherein the switch performs the selection based on intermediate results, which are at least partly reused for evaluating the result of the execution of the XML database query according to at least one of the at least two alternative execution plans.
1. A method for executing an extended markup language (XML) database query, the method comprising: compiling the XML database query to provide at least two alternative execution plans, wherein, upon execution, the at least two alternate execution plans provide a same response to the XML database query; selecting one of the at least two alternative execution plans at runtime; and executing the selected execution plan to perform the XML database query; wherein said selecting comprises a switch dynamically selecting one of the at least two alternative plans, wherein the switch performs the selection based on intermediate results, which are at least partly reused for evaluating the result of the execution of the XML database query according to at least one of the at least two alternative execution plans. 4. The method of claim 1 , wherein the XML database query is dependent on at least one external parameter and pre-compiled without the parameter being bound to a value.