Int J Performability Eng ›› 2018, Vol. 14 ›› Issue (10): 2309-2319.doi: 10.23940/ijpe.18.10.p8.23092319

• Original articles • Previous Articles     Next Articles

An Optimization Method for XML Twig Query

Zhixue Hea, Huan Wangb, and Husheng Liaoc   

  1. aCollege of Computer Science and Technology, Civil Aviation University of China, Tianjin, 300300, China
    bCollege of Computer and Remote Sensing Information Technology, North China Institute of Aerospace Engineering, Langfang, 065000, China
    cCollege of Computer, Beijing University of Technology, Beijing, 100124, China

Abstract:

XML tree pattern query, also known as Twig query, is the core operation in XML query processing. In the research of the Twig query algorithm, TreeMatch is considered to be one of the best algorithms because it reduces the generation of intermediate results. However, in the core operation getNext of the TreeMatch algorithm, there are many calculations that depend only on Twig mode. This redundant duplicate calculation affects the performance of the TreeMatch algorithm when there are many getNext calls. In order to further improve the algorithm, this paper proposes a Twig query optimization method based on partial evaluation and hot-trace compilation. This method takes Twig mode as an invariant to perform partial evaluation and translates query requests into a Twig query machine instruction sequence. The duplication calculation of the Twig pattern during the query process is avoided, and the process of interpretation of the instruction sequence of the query machine is optimized by using the hot trace compilation technique. The comparison experiment shows that the optimization method based on partial evaluation and hot-trace compilation can increase the efficiency of twig query by 20% to 60%.


Submitted on July 15, 2018; Revised on August 10, 2018; Accepted on September 12, 2018
References: 16