摘要 |
PURPOSE: To provide a method for optimizing the question of a related database by setting a group by operator to be the internal point of an execution plan in the question of the related data base having the group by operator. CONSTITUTION: The question having the group by operator in a root is received and plural execution plans by considering the placement of the group by operator prior to the respective inner connection nodes are generated for the question. Costs are estimated for the plural execution plans and the execution plan with the most inexpensive estimation cost is selected. Namely, a related data base management system 2 receives the question 10 to be optimized and the question 10 is supplied to an optimizing means 12. The optimizing means 12 optimizes the question 10 in accordance with cost information 14. Here, the optimizing means 12 receives the question 10, generates the plural alternative execution plans and selects the optimum plan. The related data base management system 12 contains a related execution engine 16 accessing to a related table 18 at the time of processing the question 10 in accordance with the selected optimum plan.
|