Annotated Data Guide for XPath Cost Estimation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database systems face challenges in accurately estimating the cost of executing XPath queries, which is crucial for optimizing query processing but lacks effective methods to compute these costs efficiently.

Innovation Solution

The approach involves maintaining an annotated data guide that stores statistical information about XML documents, allowing the database server to estimate the cost of XPath queries by analyzing the XML document structure and using formulas to calculate CPU and I/O costs, guiding the choice of evaluation methods such as streaming evaluation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If streaming evaluation of XPath queries is used, then query processing efficiency is improved, but accurate cost estimation becomes difficult

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidcost estimation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent pre-computes and stores statistical information about XML document structures (node counts, element frequencies, path lengths) in annotated data guides before query execution. This preliminary preparation enables the cost estimator to quickly calculate expected costs for streaming evaluation without performing complex real-time analysis, thus maintaining both efficiency and estimation accuracy

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediate cost estimation module that uses statistical summaries from annotated data guides to predict streaming evaluation costs. This intermediary translates complex streaming query characteristics into comparable cost metrics, enabling the query optimizer to make informed decisions without directly executing full streaming evaluations for cost calculation

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If comprehensive statistical information is maintained for accurate cost estimation, then measurement precision is improved, but device complexity increases

Engineering Contradiction:
Improvecost estimation accuracyVSAvoiddata guide maintenance complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent divides the statistical information storage into hierarchical levels: document-level statistics, element-level statistics, and path-level statistics. Each level contains only the information necessary for that granularity, avoiding redundant storage and simplifying maintenance. The annotated data guide structure organizes statistics in discrete, manageable segments that can be independently updated

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements automatic collection and maintenance of statistical information through triggers and event handlers that update the annotated data guides whenever XML documents are inserted, updated, or deleted. This self-service mechanism eliminates the need for manual statistical computation and keeps the data guides synchronized without additional human intervention or complex external management systems

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7797310B2Technique to estimate the cost of streaming evaluation of XPaths
Publication Date: 2010.09.14 ORACLE INT CORP
  • US7797310B2 patent drawing
  • US7797310B2 patent drawing
  • US7797310B2 patent drawing

AI summary

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.