I have a reasonably straightforward equi-join xQuery:
for $ap in input()/AccidentPackage, $apf in $ap/Form12209, $form in input()/Form12209
let $fid := $form/Identification/FormNumber
where $ap/AccidentPackageNumber/@year = 2003
and $fid/@year = $apf/@year
and $fid/@number = $apf/@number
return $ap
With just over 320 AccidentPackage documents (16 that meet the @year criteria) and about 900 Form12209 documents, the query takes 2 - 3 minutes to run on a W2K machine (and the transaction is aborted by Tamino for taking too long if selecting year=2004, which has 90% of the data). I have verified that both doctypes have standard and text indexes turned on, although the query is only marginally slower indexes off. Each AccidentPackage contains links to 1 to 3 Form12209 documents.
Explain appears to be indicating that all the documents from both doctypes will be read. Even so, I would expect such a small database to be read in less time…
Any suggestions on how to improve performance?
Thanks, eh!
Douglas Kelly,
Principal Consultant
Software AG, Inc
Sacramento, California
AKDOT.tsd (258 KB)
#API-Management#Tamino#webMethods