This paper describes an implementation of Kruskal's algorithm in query optimization process for generation of a near optimal execution query tree. The open source Post- greSQL DBMS was used in the experiments since its query optimization is performed by dynamic programming and genetic algorithm, which allows a concrete comparison with our approach. Kruskal's algorithm presents some advantages like its simplified code, its polynomial-time execution and the reduced search space to generate only one query tree, that will be the optimal tree. In most experiments, Kruskal's algorithm got the expected results in almost the same time as the results achieved by default Post- greSQL's optimization algorithms. The results confirm that Kruskal's algorithm is a feasible method for query optimization.
[1]
Carlo Zaniolo,et al.
Optimization of Nonrecursive Queries
,
1986,
VLDB.
[2]
Toshihide Ibaraki,et al.
On the optimal nesting order for computing N-relational joins
,
1984,
TODS.
[3]
Patricia G. Selinger,et al.
Access path selection in a relational database management system
,
1979,
SIGMOD '79.
[4]
Yannis E. Ioannidis,et al.
Left-deep vs. bushy trees: an analysis of strategy spaces and its implications for query optimization
,
1991,
SIGMOD '91.
[5]
Leonidas Fegaras,et al.
A New Heuristic for Optimizing Large Queries
,
1998,
DEXA.