Patent ID: 8229920

Claim:
A method for creating indexes over XML data managed by a database system, the method comprising: receiving a workload for the XML data, the workload including one or more database statements; utilizing an optimizer of the database system to enumerate a set of one or more candidate path expressions by creating a virtual universal index for an element, an attribute, and a data type in the XML data and matching a path expression to the virtual universal index; generalizing the set of one or more candidate path expressions to generate additional candidate path expressions; utilizing the optimizer to estimate a benefit associated with each candidate path expression in relation to the workload received; utilizing the optimizer to estimate a size of an index to be created using each candidate path expression; and recommending one or more path expressions from the set of one or more candidate path expressions to create the indexes over the XML data based on at least one of a system constraint, the estimated benefit associated with each candidate path expression, and the estimated size of the index to be created using each candidate path expression.