Re: [bdbxml] Cross Query Performance Issues
Tom McCubbin <[email protected]> Mon, 20 Feb 2006 07:38:13 -0500
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks John,
Everytime you comment, i learn! its been the best learning op re:
XQuery & DB XML - clearly an expert!
-tom
John Snelson wrote:
> Deepak Jois wrote:
>>> After a quick look, the 'join' that might be causing the problem is:
>>>
>>> $ref/@swissprot_accession_number = $y/accession
>>>
>>> you have string equality on both the attribute and node which looks
>>> good ( i think because i'm no XQuery guru )
>>> but maybe the values have to be cast to string so the index is used.
>
> This is not a problem. The values returned from
> "@swissprot_accession_number" and "accession" are of type
> xdt:untypedAtomic, which is automatically cast to xs:string to perform
> the equality operation.
>
>> Ok, could you tell me how to do that in XQuery exactly?
>>
>>> Or maybe no cross-container optimizations are done ???
>>
>> Could someone from Sleepycat confirm that this could be *specifically*
>> due to lack of cross container optimisations which have not been
>> incorporated so far in DB XML.
>
> Queries accross containers are just as optimised as queries within a
> single container. I've taken a look at your query, and made a few
> adjustments based on the query plan it produces. Can you try this
> (equivalent) query, to see if it performs any better for you:
>
> for $x in collection("enzyme.dbxml")/gnv_enzyme_pathway/db_entry
> for $y in collection("upt_swissprot.dbxml")/uniprot/entry
> where contains($x/enzyme_description, "Aristolochene") and
> $x/swissprot_reference_list/reference/@swissprot_accession_number =
> $y/accession
> return $y/name
>
> If you still need help getting your query to perform faster, it would
> be helpful to see a bigger sample of your data.
>
> John
>
------------------------------------------
To remove yourself from this list, send an
email to [email protected]