[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

XQJ (JSR 225)

Ken North kennorth at sbcglobal.net
Thu Jun 25 10:46:03 PDT 2009


  XQJ (JSR 225)
Michael Kay wrote:
>> The difference between them is that XQPreparedExpression contains a compiled
expression or query, whereas XQExpression merely holds the dynamic context
for executing an expression or query
.. Whenever I complained about the design (or even the nomenclature) I was told
it would all seem completely intuitive to people who know JDBC. 

That's true. It has its origin in the difference between dynamic and static SQL, with a prepared query being an attempt to achieve some of the performance benefits of static SQL (compile and optimize repetitive queries). 

The single execution, ad hoc query is dynamic - you compile and execute. If a query is repetitive, you want to avoid the overhead of compiling each time. You compile the query, the optimizer generates the access plan, and you store that plan for future execution of the query. 

In the XQuery context, it's greatest value is probably with engines that "understand" both SQL and XML - for example, a single query optimizer for both SQL and XML (use relational and XML indexes and create a graph model for execution).



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.