An Evolutionary Algorithm for Query Optimization in Database

  • Kayvan Asghari
  • Ali Safari Mamaghani
  • Mohammad Reza Meybodi


Optimizing the database queries is one of hard research problems. Exhaustive search techniques like dynamic programming is suitable for queries with a few relations, but by increasing the number of relations in query, much use of memory and processing is needed, and the use of these methods is not suitable, so we have to use random and evolutionary methods. The use of evolutionary methods, because of their efficiency and strength, has been changed in to a suitable research area in the field of optimizing the database queries. In this paper, a hybrid evolutionary algorithm has been proposed for solving the optimization of Join ordering problem in database queries. This algorithm uses two methods of genetic algorithm and learning automata synchronically for searching the states space of problem. It has been showed in this paper that by synchronic use of learning automata and genetic algorithms in searching process, the speed of finding an answer has been accelerated and prevented from getting stuck in local minimums. The results of experiments show that hybrid algorithm has dominance over the methods of genetic algorithm and learning automata.


Genetic Algorithm Hybrid Algorithm Average Cost Pseudo Code Database Management System 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    E.F. Codd, “A relational model of data for large shared data banks”, CACM, 13(6): pages 377-387, 1970.MATHGoogle Scholar
  2. [2]
    P. G. Selinger, M. M. Astrahan, D. D. Chamberlin, R. A. Lorie, and T. G. Price, “Access path selection in a relational database management system”, In Proc. Of the ACM SIGMOD Conf. on management of Data, pages 23-34, Boston, USA, 1979.Google Scholar
  3. [3]
    K. Bennet, M. C. Ferris, and Y. E. Ioannidis, “A genetic algorithm for database query optimizatio”, In Proc. Of the Fourth Intl. Conf. on Genetic Algorithms, pages 400-407, San Diego, USA, 1991.Google Scholar
  4. [4]
    T. Ibaraki and T. Kameda, “Optimal nesting for computing N-relational joins”, ACM Trans. on Database Systems, 9(3): pages 482-502, 1984.CrossRefMathSciNetGoogle Scholar
  5. [5]
    A. Swami and A. Gupta, “Optimization of large join queries”, In Proc. Of the ACM SIGMOD Conf. on Management of Data, pages 8-17, Chicago, IL, USA, 1988.Google Scholar
  6. [6]
    A.Swami, “Optimization of large join queries: Combining heuristics and combinational techniques”, In Proc. Of the ACM SIGMOD Conf. on Management of Data, pages 367-376, Portland, OR, USA, 1989.Google Scholar
  7. [7]
    M. Steinbrunn, G. Moerkotte, and A. Kemper, “Heuristic and randomized optimization for the join ordering problem”, VLDB Journal: Very Large Data Bases, 6(3): pages 191-208, 1997.CrossRefGoogle Scholar
  8. [8]
    R. Lanzelotte, P. Valduriez, and M. Zait, “On the effectiveness of optimization search strategies for parallel execution spaces”, In Proc. Of the Conf. on Very Large Data Bases (VLDB), pages 493-504, Dublin, Ireland, 1993.Google Scholar
  9. [9]
    M. M. Astrahan et al, “System R: A relational approach to data management.” ACM Trans. on Database Systems, 1(2) pages 97-137, 1976.CrossRefGoogle Scholar
  10. [10]
    R. Krishnamurthy, H. Boral, and C. Zaniolo, “Optimization of non recursive queries.”, In Proc. of the Conf. on Very Large Data Bases (VLDB), pages 128-137, Kyoto, Japan, 1986.Google Scholar
  11. [11]
    A. Swami and B. Iyer, “A polynomial time algorithm for optimizing join queries.”, In Proc. IEEE Conf. on Data Engineering, pages 345-354, Vienna, Austria, 1993.Google Scholar
  12. [12]
    Y. E. Ioannidis and Y. C. Kang, “Randomized algorithms for optimizing large join queries”, In Proc. Of the ACM SIGMOD Conf. on Management of Data, pages 312-321, Atlantic City, USA, 1990.Google Scholar
  13. [13]
    Y. Ioannidis and E. Wong, “Query optimization by simulated annealing”, In Proc. Of ACM SIGMOD Conf. on the Management of Data, pages 9-22, San Francisco, CA, 1987.Google Scholar
  14. [14]
    S. Kirkpatrick, C. D. Gelatt, Jr., and M. P. Vecchi, “Optimization by simulated annealing”, Science, 220(4598): pages 671-680, 1983.Google Scholar
  15. [15]
    C. Galindo-Legaria, A. Pellenkoft, and M. Kersten, “Fast, randomized join-order selection why use transformations”, In Proc. Of the 20th Intl. Conf. on Very Large Data Bases (VLDB), pages 85-95, Santiago, Chile, 1994.Google Scholar
  16. [16]
    M. Stillger and M. Spiliopoulou, “Genetic programming in database query optimization”, In Proc. Of the First Annual Conf. on Genetic Programming, pages 388-393, Stanford University, CA, USA, 1996.Google Scholar
  17. [17]
    V. Muntes-Mulero, J. Aguilar-Saborit, C. Zuzarte, and J.-L. Larriba-Pey, “Cgo: a sound genetic optimizer for cyclic query graphs”, In Proc. Of ICCS 2006, pages156-163, Reading, Springer-Verlag, UK, 2006.Google Scholar
  18. [18]
    H. Beigy and M. R. Meybodi, “Randomized Las Vegas Algorithm for Graph Isomorphism”, Proc. of Third Intl. Conf. on Intelligent Data Engineering and Automated Learning, Manchester, UK, Aug.12-14, 2002.Google Scholar
  19. Y. Wang and, K. “Fan Genetic-Basic Search for Error-Correcting Graph Isomorphism”, IEEE Trans. on Systems, Man. And Cybernetics-Par‘t B: Cybernetics, Vol. 27, No. 4, August 1997.Google Scholar
  20. [20]
    P. Mars, K. S. Narendra and M. Chrystall, “Learning Automata Control of Computer Communication Networks”, Proc. Of Third Yale workshop on Application of Adaptive Systems Theory. Yale University, 1983.Google Scholar
  21. [21]
    A. Hashim, S., Amir and P. Mars, “Application of Learning Automata to Data Compression”, In Adaptive and Learning Systems, K. S. Narendra (Ed), New York: Plenum Press, pp. 229-234, 1986.Google Scholar
  22. [22]
    M. A. L. Thathachar and P. S. Sastry, “Learning Optimal Discriminant Functions Through a Cooperative Game of Automata”, IEEE Trans. Syst., Man and Cybern., Vol. 27, No. 4, pp. 588-597, 1997.CrossRefGoogle Scholar
  23. [23]
    K.S. Narendra and M.A.L. Thathachar, Learning Automata: An Introduction, Prentice-hall, Englewood cliffs, 1989.Google Scholar
  24. [24]
    M. R. Meybodi and S. Lakshmivarhan, “A Learning Approach to Priority Assignment in a Two Class M/M/1 Queuing System with Unknown Parameters”, Proc. Of Third Yale Workshop on Applications of Adaptive System Theory, Yale University, pp. 106-109, 1983.Google Scholar
  25. [25]
    M. R. Meybodi and H. Beigy, “New Class of Learning Automata Based Scheme for Adaptation of Back propagation Algorithm Parameters”, Proc. Of EUFIT-98, Sep. 7-10, Achen, Germany, pp. 339-344, 1998.Google Scholar
  26. [26]
    B. J. Oommen and D. C. Y. Ma, “Deterministic Learning Automata Solution to the Keyboard Optimization Problem”, IEEE Trans. On Computers, Vol. 37, No. 1, pp. 2-3, 1988.MATHCrossRefMathSciNetGoogle Scholar
  27. [27]
    H. Beigy and M. R. Meybodi, “Optimization of Topology of neural Networks Using Learning Automata”, Proc. Of 3th Annual Intl. Computer Society of Iran Computer Conf. CSICC-98, Tehran, Iran, pp. 417-428, 1999.Google Scholar
  28. [28]
    B. Falkenhainer, K.D. Forbus, and D. Gentner. “The Structure-mapping Engine: Algorithms and Examples”, Artificial Intelligence, No 41, pp. 1–63, 1989/90.Google Scholar
  29. [29]
    E. Cantu-Paz, “A Survey of Parallel Genetic Algorithms”, IlliGAL Report, No. 97003, May 1997.Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2008

Authors and Affiliations

  • Kayvan Asghari
    • 1
  • Ali Safari Mamaghani
    • 2
  • Mohammad Reza Meybodi
    • 3
  1. 1.Islamic Azad University of KhameneEast AzerbayjanIran
  2. 2.Islamic Azad University of BonabEast AzerbayjanIran
  3. 3.Industrial University of AmirkabirTehranIran

Personalised recommendations