XQSBench: XQuery Selectivity Estimation Benchmark 





Group 1: Path Expressions 

Q1 
Path expression with nonrecursive axes 


Find the names of all persons in the auction document 



Q2 
Path expression with recursive axes 


Find all description nodes descendant of all item nodes 



Q3 
Path expression with wild cards 


Return the subtree of the africa region 



Q4 
Path expression with orderedbased axes 


Return the description nodes following the nodes with the tag name closed_auction 



Q5 
Branching XPath Expressions 


Return the names of all persons with id less than 'person10' 



Group 2: Twig Expressions 

Q6 
Simple twig expression 


Return the names and description of all items 



Q7 
Twig expression with element construction 


Return the restructured result of the names and description of all items 



Group 3: Predicates 

Q8 
Positional Predicates 


Return the third bidder of each open auction 



Q9 
Equality Predicates 


Return the closed auctions with price equal to 40 



Q10 
Range Predicates 


Return the closed auctions with price less than 40 



Q11 
Conjunctive/Disjunctive Predicates 


Return the closed auctions with price greater than 40 and less than 100 



Q12 
Predicates with merged nodes from different paths 


Return the african and asian items with id value greater than 100 



Q13 
Predicates with merged nodes from different paths and hybrid natures 


Return the price nodes and quantity nodes with value greater than 100 



Q14 
String Predicates 


Return all persons with id value greater than ‘person200’ 



Group 4: Values Comparisons (Theta Joins) 

Q15 
Value comparison where the values of each operand are constructed by path expression 


Return all pairs of increase value and price value where the increase value is greater than the price value 



Q16 
Value comparison where the values of one operand are constructed by path expression and the values of the other operand are constructed by path expression manipulated with arithmetic expression 


Return all pairs of increase value and price value where the increase value is greater than the price value multiplied by 2 



Q17 
Values Join 


Return all pairs of increase value and price value where the increase value is equal to the price value 



Q18 
Arithmetic Operations on Statistical Summaries 1 


Return all pairs of increase value and price value where the sum of the increase value and the price value is greater than 100 



Q19 
Arithmetic Operations on Statistical Summaries 2 


Return all pairs of increase value and price value where the sum of the increase value and the price value is equal to 100 



Q20 
Arithmetic Operations on Statistical Summaries 3 


Return all triples of increase value, price value and income where the sum of the increase value and the income value is greater than the sum of the price value and the income value 



Group 5: Nested Expressions 

Q21 
Let – Aggregates 


Return the names of persons and the number of items that they bought 



Group 6: Data Dependent Estimations 

Q22 
Predicates with values constructed by aggregate function 


Return the open auctions with sum of bidder increases that are greater than 1000 



Q23 
SubString Matching 


Return the names of all items whose description contains the word `gold' 



Q24 
Distinct Values 


Return the distinct price values 



Q25 
Document Order 


Return the open auctions where a certain person issued a bid before another person 



All Queries 
