Technique to estimate the cost of streaming evaluation of XPaths
First Claim
Patent Images
1. A method to estimate a cost for computing a query on XML documents stored in a database, the method comprising the steps of:
- maintaining a plurality of statistics about nodes in said XML documents;
based upon said plurality of statistics, estimating a cost for computing at least one path expression in said query on said XML documents, said cost comprising an estimated CPU cost and an estimated I/O cost;
wherein the cost of computing the at least one path expression is determined based on a mathematical function of the estimated CPU cost and the estimated I/O cost;
wherein computing said at least one path expression is performed using streaming evaluation;
wherein estimating a cost for computing a path expression of the at least one path expression includes;
estimating an input-size of said XML documents, said input-size being based on units of bytes;
based on a portion of said plurality of statistics about said nodes, estimating an output-size associated with said path expression;
wherein the steps are performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for estimating the cost of streaming evaluation of XPaths is provided. Aggregate statistics are maintained by the database server upon initiation of a database function by the database administrator about the nodes of the XML document. Based upon these statistics and the complexity of the particular XPath query, an estimate of the cost of the query, in time and computing resources required, is computed.
313 Citations
26 Claims
-
1. A method to estimate a cost for computing a query on XML documents stored in a database, the method comprising the steps of:
-
maintaining a plurality of statistics about nodes in said XML documents;
based upon said plurality of statistics, estimating a cost for computing at least one path expression in said query on said XML documents, said cost comprising an estimated CPU cost and an estimated I/O cost;wherein the cost of computing the at least one path expression is determined based on a mathematical function of the estimated CPU cost and the estimated I/O cost; wherein computing said at least one path expression is performed using streaming evaluation; wherein estimating a cost for computing a path expression of the at least one path expression includes; estimating an input-size of said XML documents, said input-size being based on units of bytes; based on a portion of said plurality of statistics about said nodes, estimating an output-size associated with said path expression; wherein the steps are performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer-readable volatile or non-volatile storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:
- maintaining a plurality of statistics about nodes in said XML documents;
based upon said plurality of statistics, estimating a cost for computing at least one path expression in said query on said XML documents, said cost comprising an estimated CPU cost and an estimated I/O cost; wherein the cost of computing the at least one path expression is determined based on a mathematical function of the estimated CPU cost and the estimated I/O cost; wherein computing said at least one path expression is performed using streaming evaluation; wherein estimating a cost for computing a path expression of the at least one path expression includes; estimating an input-size of said XML documents, said input-size being based on units of bytes; based on a portion of said plurality of statistics about said nodes, estimating an output-size associated with said path expression. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
- maintaining a plurality of statistics about nodes in said XML documents;
Specification