摘要
提出了一种新的用于关系数据库查询缓冲和预取的方法。首先将数据查询语句抽象成由四元组组成的查询模板,同时保存了查询语句的实际参数。基于这些模板和参数,提出了两种智能预取算法以适应两类不同的数据查询需求。第一个算法基于蚁群规则,该算法能够用于预测将来具有最高可能性的查询。经过监控某个特定应用对于数据库所发生的大量查询,实际的模板数要远远小于发生的查询数。当通过考虑查询模板和跟踪历史查询记录来预测未来可能发生的查询时,提出了第二类算法。该算法基于惯性规则,它使用BP网络来跟踪用户的查询历史。相对于前面的算法,该算法更适合多应用共存的场合。在模拟实验中发现对于单个应用而言,查询具有很高的模板依赖性,而对于多应用场合,惯性规则具有更好的适应性。
This paper explored a new approach toward intelligent caching and prefetching for data query of DBMS. First abstracted the data query statement into query patterns which consisted of four units. Also considered the real query parameters which could be used to build real query from the query pattern. Based on the query pattern and the real query parameters, it developed two intelligent prefetch algorithms to fit two kinds of demand in data query. The first algorithm based On-ant-group rule, It could be used to predict the future query with highest probability. Experiments showed that in contrast to the substantially large number of queriescoming of the special application to the database system, the number of patterns of these differentqueries were quite limited. It took into consideration the query pattern and the historytrace of query reference when predicting future query and developed the second algorithm based on inertia rule which used BP network to trace the history of user query. It was more fit for the multi-application situation than the previous. Simulation shows the inter-query locality is highly query pattern dependable under single-application situation and the inertia rule has more flexibility under multi-application situation.
出处
《计算机应用研究》
CSCD
北大核心
2007年第5期35-37,40,共4页
Application Research of Computers
基金
国家自然科学基金资助项目(60025206)
装备预先研究项目基金资助项目