# Query Optimization in Distributed Database Based on Improved Artificial Bee Colony Algorithm
## 3 Experiment Results and Analysis
### Results and Discussion
Although both DYNABC-GO and ABC-GO have efficient convergence speeds, in the later iterations of the algorithm, DYNABC-GO can generate plans with better fitness values than ABC-GO, thus proving that the introduction of dynamic perturbation factors can enhance the local search ability of the algorithm in the later stages. The use of smaller perturbation coefficients in the later stages of the algorithm when the skillfulness of the algorithm is more mature can enhance the convergence effect more effectively. Figure 18 demonstrates the experimental results of the cost of the optimal execution plan between the present method and recently published related methods. Figure 19 shows the execution time of each algorithm. In Figures 18 and 19, MACGA is the multi-ant colony genetic algorithm [29], and DEGA is the adaptive genetic algorithm based on double entropy [31]. As the figures show, compared to the other two methods, the proposed method in this paper is able to find less costly execution plans for queries of different lengths and with the same iteration limitations. However, DYNABC-GO and DEGA require more algorithmic execution time. Figure 16: The iterative convergence efficiency of each method when DSM is 50 \(\times\) 200. Figure 14: The iterative convergence efficiency of each method when DSM is 50 \(\times\) 150. Figure 15: The iterative convergence efficiency of each method when DSM is 85 \(\times\) 150. MACGA is a hybrid algorithm that combines a genetic algorithm and an ant colony algorithm in a serial fashion, wherein the rapid convergence of the genetic algorithm is first used to generate a relatively optimal population, and then the ant colony algorithm is used to further search for the optimal solution. Although this method has a very short execution time and produces less costly query execution plans in the case of shorter join queries, the cost of the resulting execution plans is very high in the face of longer join queries. DEGA introduces two types of entropy into the genetic algorithm to increase the diversity of the population and to prevent the algorithm from falling into a local optimum. This makes the algorithm really effective in the face of high-dimensional connectivity queries but, due to the fact that the entropy value has to be computed for a different individual in each iteration, this makes the algorithm need more execution time and overly maintains the diversity of the population, which makes the algorithm worse in lower connectivity queries. The method proposed in this paper has the possibility to perform crossover and mutation operations during each iteration, which can effectively avoid the problem of the algorithm falling into a local optimum; however, it also increases a certain amount of computation, leading to an increase in execution time. In contrast, although both DYNABC-GO and DEGA increase the execution time to a certain extent, the method in this paper introduces a dynamic perturbation factor to achieve better performance in the face of different dimensions of the join query, thus further proving the effectiveness of the method proposed in this paper. Figure 17: The iterative convergence efficiency of each method when DSM is \(85\times 200\). Figure 18: The best query plan execution cost.