Login
User name:
Password:
Remember me 
Powered by BlogHarbor
Powered by BlogHarbor
Re: Join optimization
by Michael Kay
I've established why the two ">" join queries are running slightly slower in Saxon-SA. It's because, paradoxically, Saxon-B sometimes has better type information available than Saxon-SA. Given this path expression for $i in /site/open_auctions/open_auction/initial Saxon-B knows that the result of atomizing $i will be untyped atomic, and therefore (5000*$i) will be an xs:double, and therefore that in the expression $p/profile/@income > (5000 * $i), the left-hand operand will have to be converted to double and the comparison will be between two doubles. Saxon-SA, in the absence of a schema, doesn't know what types the nodes will be, and has to allow for the possibility that this expression is testing values of type duration. So it has to do more of the work at run-time. If there's a moral to this tale, it's that Saxon-SA works best when there's a schema! In fact, if there isn't a schema, you can get the same behavior as Saxon-B by setting configuration.setAllNodesUntyped(true), which should redress the performance difference.
Post comment:
  Receive comment notifications for this article
Subject: 
Comment: 
Comment verification:

Please enter the text you see inside the graphic to post your comment:
This blog does not allow anonymous comments. Please provide your username and password along with your comment.
Login information:
Username: 
Password: 
If you would like to post contact information on your comment, please enter your information into the optional fields below:
Contact information:
URL:  example: http://yourdomain.com