介绍了蚁群算法在数据库查询中的应用,在给出蚁群算法的基本原理和程序流程的基础上,对传统蚁群算法进行了改进,将伪随机状态转移规则和局部信息素更新规则引入蚁群算法,提出了基于蚁群系统解决数据库多连接查询优化的方法,建立了多连接查询优化问题的数学模型,并进行了相关的实验;结果表明:当数据库的表数目较多时,基于蚁群系统算法对解决多连接查询优化问题有良好的求解性能,在求最优解品质和求最优解时间上都有较好的效果。%This paper introduced the ant colony algorithm (ACA)to the database query.It listed the basic principles and program process and improved the traditional ACA.The local pheromone update rule and pseudo-random proportion were introduced to the ACA,and then this paper built a multi-join query optimization model based on ant colony system (ACS ), and experiments were carried out. The experiments show that this algorithm has the better effect on optimal solution quality and optimal solution time of multi-join query optimization problem when the number of tables is large in your database.
展开▼