1. A method comprising: storing summary data that (a) specifies a number of each element of a plurality of elements of an XML document that is part of XML data and (b) indicates a hierarchical relationship among the plurality of elements; identifying, in a particular query that targets a portion of the XML data, a plurality of predicates that comprises a first subset and a second subset that is different than the first subset; analyzing the summary data based on the first subset of the plurality of predicates; determining that at least a first predicate in the first subset of the plurality of predicates is correlated with a second predicate in the second subset of the plurality of predicates; in response to determining that the first predicate is correlated with the second predicate, generating a single selectivity value based on the first subset of the plurality of predicates, one or more predicates that do not belong to the first subset of the plurality of predicates, and the summary data; associating the single selectivity value with the first subset of the plurality predicates; and estimating, based on the single selectivity value, a cost of executing the particular query; wherein the method is performed by one or more computing devices.
1. A method comprising: storing summary data that (a) specifies a number of each element of a plurality of elements of an XML document that is part of XML data and (b) indicates a hierarchical relationship among the plurality of elements; identifying, in a particular query that targets a portion of the XML data, a plurality of predicates that comprises a first subset and a second subset that is different than the first subset; analyzing the summary data based on the first subset of the plurality of predicates; determining that at least a first predicate in the first subset of the plurality of predicates is correlated with a second predicate in the second subset of the plurality of predicates; in response to determining that the first predicate is correlated with the second predicate, generating a single selectivity value based on the first subset of the plurality of predicates, one or more predicates that do not belong to the first subset of the plurality of predicates, and the summary data; associating the single selectivity value with the first subset of the plurality predicates; and estimating, based on the single selectivity value, a cost of executing the particular query; wherein the method is performed by one or more computing devices. 3. The method of claim 1 , further comprising: receiving an initial query; and generating, based on the initial query, a set of one or more subsequent queries, wherein the set of one or more subsequent queries includes the particular query.