Learn XQuery |
Home:Learn XQuery:White Papers:Generating SQL:Selecting Data Selecting DataTo minimize data retrieval, DataDirect XQuery® generates very selective SQL, returning only the data that is needed for a given XQuery. To avoid retrieving rows that are not needed, the conditions in Where clauses and predicates are converted to Where clauses in the generated SQL. To avoid retrieving columns that are not needed, the generated SQL specifies the columns actually needed to evaluate the XQuery. Some XQuery implementations retrieve much more data than is actually needed, which significantly hurts performance. Example 1. Where Clause PushdownIn this example, the SQL query generated by DataDirect XQuery® returns only the rows that are actually needed for the XQuery. XQuery (with Where clause) for $h in collection('HOLDINGS')/HOLDINGS
XQuery (with predicate) for $h in collection('HOLDINGS')/HOLDINGS[SHARES < 10000]
Generated SQL (for both forms of the XQuery) SELECT ALL Example 2. Column PushdownThe SQL query generated by DataDirect XQuery® retrieves only the columns that are actually needed for the XQuery. XQuery for $u in collection('USERS')/USERS
Generated SQL SELECT ALL |
Try DataDirect XQuery® Free!Put the power, scalability, and performance of DataDirect XQuery® to work for you today! Our free trial lets you see for yourself how easy it is to build data integration applications that access relational, EDI, and other file formats as XML! Online Video Tutorials!Our easy-to-follow online video tutorials are a great way to get acquainted with the many features of DataDirect XQuery®. And if you like what you see, download a free copy today and try DataDirect XQuery® for yourself! Back to School with DataDirect XQuery®Getting your mind around the possibilities of a data integration technology as promising as XQuery can be difficult, but our XML developers Webinars will help you understand the power and versatility of XQuery, and our favorite XQuery processor, DataDirect XQuery®. Stay Informed!XQuery is one of the hottest XML technologies being developed today. Stay informed with vital news about standards, tools, and trends by signing up for the DataDirect XQuery® newsletter.
|





