Inventors:
Zhen Hua Liu - San Mateo CA, US
Thomas Baby - Maple Valley WA, US
Sukhendu Chakraborty - San Francisco CA, US
Anguel Novoselsky - Foster City CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 17/30
G06F 7/00
Abstract:
Techniques are provided for efficiently evaluating XML queries that conform to an extension of an XML language (e. g. , XQuery or XPath). The extension allows XML queries to have full-text search capabilities. Such an XML query is compiled to generate a tree of nodes that correspond to one or more conditions in the full-text portion of the query. In one technique, the amount of memory for the execution state of the tree is determined at compile time and allocated only once throughout execution of the query. In another technique, to ensure at most a single scan of a document, all the words or phrases in the full-text portion of an XML query are located before any of the other conditions in the full-text portion are evaluated. In another technique, the elements of the full-text portion of an XML query are analyzed to determine, based at least in part on cost, which evaluation strategy, of a plurality of evaluation strategies, should be employed.