We have a directory that includes policy data, each in a separate document, with the root node name InsurancePolicy. I'm trying to figure out the best way to optimize querying /InsurancePolicy. The documents in this directory are currently at about 20,000 and are quickly growing. I'm currently trying to run queries for data cleaning and viewing data in general such as:

for $unattachedpolicy in /InsurancePolicy
where empty(/[EMAIL PROTECTED] = $unattachedpolicy/@productId and @version = $unattachedpolicy/@productVersion]/@id) return <unattachedpolicy id={$unattachedpolicy/@id} productId= {$unattachedpolicy/@productId} productVersion={$unattachedpolicy/ @productVersion}/>

The time it takes this to process is very long, and I know there must be something we can do to improve the performance of this call and/or the settings for this group of documents.

I thought setting and Element Index of "InsurancePolicy" might do the trick, but I couldn't find a scalar type that indexes it as a node and setting the type as string doesn't work for most of our purposes. What are some ways of improving performance of the / InsurancePolicy query in our scenario? Thanks.

Patrick Force
[EMAIL PROTECTED]
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to