improving query performance

Friday, 21 August 2020 · 17 messages · last reply 24 Aug 2020
CG
Christian Grünin reply to Bill Osmond, 22 Aug 2020, 01:2621 Aug 2020 23:38 #
Just a quick hint: As the query info output indicates that no text index is used (see [1]), you could try to attach explicit text() steps in your comparisons:
where $track_release/ReleaseLabelReference/text() =
$r/PartyList/Party/PartyReference/text()
...
where $track_release/ReleaseResourceReference/text() =
$sound_recording/ResourceReference/text()
...
Feel free to provide us with a minimized XML document that allows us to run your query. [1] https://docs.basex.org/wiki/Indexes
Quoted text · Bill Osmond · 260 lines
On Fri, Aug 21, 2020 at 11:26 PM Bill Osmond <bill at with.in> wrote: > > The indentation levels and multiple returns in your suggested query alone has helped me in understanding what's actually going on, and I've rewritten the query mostly as you suggest: > > for $r in /ernm:NewReleaseMessage > for $track_release in $r/ReleaseList/TrackRelease > where $track_release/ReleaseLabelReference = $r/PartyList/Party/PartyReference > return > for $party in $r/PartyList/Party > for $sound_recording in $r/ResourceList/SoundRecording > where $track_release/ReleaseResourceReference = $sound_recording/ResourceReference > return > for $release in $r/ReleaseList/Release > where $track_release/ReleaseResourceReference = $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > return > <identity> > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') }</artist> > <title>{ $sound_recording/DisplayTitleText/text() }</title> > <album>{ $release/DisplayTitleText/text() }</album> > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> > </identity> > > I say "mostly" because at the first 'where' statement, I had to replace the $party/PartyReference on the right side of the = with an explicit reference from $r, because $party isn't defined until 2 lines further down. The query does work and appears to be giving the right results, however the performance is basically the same: 127,698.27 ms for this run vs. 114,935.22 ms for the original. I'll try shuffling things around next! > > On Fri, Aug 21, 2020 at 1:52 PM Bill Osmond <bill at with.in> wrote: >> >> Thank you both! I was in the middle of typing a response to Bridger when this came through, so while I digest both of your messages & test index addition/moving things around, I'll leave the output from the GUI info panel here - if I knew how to read it, it would no doubt point straight at the issue! I'll note that it runs much quicker locally as opposed to on server+via the python BaseXClient, but I don't know if that's because the GUI is stopping at 500k results, or what. >> >> Compiling: >> - rewrite context value to document-node() sequence: . -> (db:open-pre("umg-118061851424", 0), ...) >> - rewrite util:root(nodes) to document-node() sequence: util:root((db:open-pre("umg-118061851424", 0), ...)) -> (db:open-pre("umg-118061851424", 0), ...) >> - move where clause: $track_release_1/ReleaseLabelReference = $party_2/PartyReference >> - swap operands: PartyReference = $track_release_1/ReleaseLabelReference >> - rewrite to predicate: PartyReference = $track_release_1/ReleaseLabelReference >> - move where clause: $track_release_1/ReleaseResourceReference = $sound_recording_3/ResourceReference >> - swap operands: ResourceReference = $track_release_1/ReleaseResourceReference >> - rewrite to predicate: ResourceReference = $track_release_1/ReleaseResourceReference >> - swap operands: ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference = $track_release_1/Rel... >> - rewrite to predicate: ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference = $track_release_1/Rel... >> - inline for $release_4 in $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/Rele... >> >> Optimized Query: >> for $r_0 in (db:open-pre("umg-118061851424", 0), ...)/ernm:NewReleaseMessage for $track_release_1 in $r_0/ReleaseList/TrackRelease for $party_2 in $r_0/PartyList/Party[PartyReference = $track_release_1/ReleaseLabelReference] for $sound_recording_3 in $r_0/ResourceList/SoundRecording[ResourceReference = $track_release_1/ReleaseResourceReference] return $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference = $track_release_1/ReleaseResourceReference] ! <identity> <isrc> { $track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> { string-join($sound_recording_3/DisplayArtistName, "/") } </artist> <title> { $sound_recording_3/DisplayTitleText/text() } </title> <album> { DisplayTitleText/text() } </album> <icpn> { ReleaseId/ICPN/text() } </icpn> <sublabel> { $party_2/PartyName/FullName/text() } </sublabel> </identity> >> >> Query: >> declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in /ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease for $party in $r/PartyList/Party for $sound_recording in $r/ResourceList/SoundRecording for $release in $r/ReleaseList/Release where $track_release/ReleaseLabelReference = $party/PartyReference and $track_release/ReleaseResourceReference = $sound_recording/ResourceReference and $track_release/ReleaseResourceReference = $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference return <identity> <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') }</artist> <title>{ $sound_recording/DisplayTitleText/text() }</title> <album>{ $release/DisplayTitleText/text() }</album> <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> <sublabel>{ $party/PartyName/FullName/text() }</sublabel> </identity> >> >> Result: >> - Hit(s): 500000 Items >> - Updated: 0 Items >> - Printed: 8192 kB >> - Read Locking: umg-118061851424 >> - Write Locking: (none) >> >> Timing: >> - Parsing: 2.88 ms >> - Compiling: 4.38 ms >> - Evaluating: 114935.22 ms >> - Printing: 114.59 ms >> - Total Time: 115057.07 ms >> >> Query Plan: >> <QueryPlan compiled="true" updating="false"> >> <GFLWOR type="element()*"> >> <For type="element()" size="1" name="$r" id="0"> >> <IterPath type="element()*" database="umg-118061851424"> >> <DBNodeSeq type="document-node()+" size="136938" database="umg-118061851424"> >> <DBNode pre="0" type="document-node()" size="1" database="umg-118061851424"/> >> <DBNode pre="59" type="document-node()" size="1" database="umg-118061851424"/> >> <DBNode pre="118" type="document-node()" size="1" database="umg-118061851424"/> >> <DBNode pre="177" type="document-node()" size="1" database="umg-118061851424"/> >> <DBNode pre="236" type="document-node()" size="1" database="umg-118061851424"/> >> </DBNodeSeq> >> <IterStep axis="child" test="ernm:NewReleaseMessage" type="element()*"/> >> </IterPath> >> </For> >> <For type="element()" size="1" name="$track_release" id="1"> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$r" id="0"/> >> <IterStep axis="child" test="ReleaseList" type="element()*"/> >> <IterStep axis="child" test="TrackRelease" type="element()*"/> >> </IterPath> >> </For> >> <For type="element()" size="1" name="$party" id="2"> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$r" id="0"/> >> <IterStep axis="child" test="PartyList" type="element()*"/> >> <IterStep axis="child" test="Party" type="element()*"> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> <SingleIterPath type="element()*" database="umg-118061851424"> >> <IterStep axis="child" test="PartyReference" type="element()*"/> >> </SingleIterPath> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$track_release" id="1"/> >> <IterStep axis="child" test="ReleaseLabelReference" type="element()*"/> >> </IterPath> >> </CmpHashG> >> </IterStep> >> </IterPath> >> </For> >> <For type="element()" size="1" name="$sound_recording" id="3"> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$r" id="0"/> >> <IterStep axis="child" test="ResourceList" type="element()*"/> >> <IterStep axis="child" test="SoundRecording" type="element()*"> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> <SingleIterPath type="element()*" database="umg-118061851424"> >> <IterStep axis="child" test="ResourceReference" type="element()*"/> >> </SingleIterPath> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$track_release" id="1"/> >> <IterStep axis="child" test="ReleaseResourceReference" type="element()*"/> >> </IterPath> >> </CmpHashG> >> </IterStep> >> </IterPath> >> </For> >> <DualMap type="element()*"> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$r" id="0"/> >> <IterStep axis="child" test="ReleaseList" type="element()*"/> >> <IterStep axis="child" test="Release" type="element()*"> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> <IterPath type="element()*" database="umg-118061851424"> >> <IterStep axis="child" test="ResourceGroup" type="element()*"/> >> <IterStep axis="child" test="ResourceGroup" type="element()*"/> >> <IterStep axis="child" test="ResourceGroupContentItem" type="element()*"/> >> <IterStep axis="child" test="ReleaseResourceReference" type="element()*"/> >> </IterPath> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$track_release" id="1"/> >> <IterStep axis="child" test="ReleaseResourceReference" type="element()*"/> >> </IterPath> >> </CmpHashG> >> </IterStep> >> </IterPath> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">identity</QNm> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">isrc</QNm> >> <IterPath type="text()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$track_release" id="1"/> >> <IterStep axis="child" test="ReleaseId" type="element()*"/> >> <IterStep axis="child" test="ISRC" type="element()*"/> >> <IterStep axis="child" test="text()" type="text()*"/> >> </IterPath> >> </CElem> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">artist</QNm> >> <FnStringJoin name="string-join" type="xs:string" size="1"> >> <IterPath type="element()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$sound_recording" id="3"/> >> <IterStep axis="child" test="DisplayArtistName" type="element()*"/> >> </IterPath> >> <Str type="xs:string" size="1">/</Str> >> </FnStringJoin> >> </CElem> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">title</QNm> >> <IterPath type="text()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$sound_recording" id="3"/> >> <IterStep axis="child" test="DisplayTitleText" type="element()*"/> >> <IterStep axis="child" test="text()" type="text()*"/> >> </IterPath> >> </CElem> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">album</QNm> >> <IterPath type="text()*" database="umg-118061851424"> >> <IterStep axis="child" test="DisplayTitleText" type="element()*"/> >> <IterStep axis="child" test="text()" type="text()*"/> >> </IterPath> >> </CElem> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">icpn</QNm> >> <IterPath type="text()*" database="umg-118061851424"> >> <IterStep axis="child" test="ReleaseId" type="element()*"/> >> <IterStep axis="child" test="ICPN" type="element()*"/> >> <IterStep axis="child" test="text()" type="text()*"/> >> </IterPath> >> </CElem> >> <CElem type="element()" size="1"> >> <QNm type="xs:QName" size="1">sublabel</QNm> >> <IterPath type="text()*" database="umg-118061851424"> >> <VarRef type="element()" size="1" database="umg-118061851424" name="$party" id="2"/> >> <IterStep axis="child" test="PartyName" type="element()*"/> >> <IterStep axis="child" test="FullName" type="element()*"/> >> <IterStep axis="child" test="text()" type="text()*"/> >> </IterPath> >> </CElem> >> </CElem> >> </DualMap> >> </GFLWOR> >> </QueryPlan> >> >> On Fri, Aug 21, 2020 at 1:48 PM Liam R. E. Quin <liam at fromoldbooks.org> wrote: >>> >>> On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: >>> > >>> > declare namespace ernm="http://ddex.net/xml/ern/411"; >>> > >>> > for $r in /ernm:NewReleaseMessage >>> > for $track_release in $r/ReleaseList/TrackRelease >>> > for $party in $r/PartyList/Party >>> > for $sound_recording in $r/ResourceList/SoundRecording >>> > for $release in $r/ReleaseList/Release >>> > where >>> > $track_release/ReleaseLabelReference = $party/PartyReference >>> > and $track_release/ReleaseResourceReference = >>> > $sound_recording/ResourceReference >>> > and $track_release/ReleaseResourceReference = >>> > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release >>> > ResourceReference >>> >>> BaseX is probably smart enough to rewrite this, but check - >>> >>> for $r in /ernm:NewReleaseMessage >>> for $track_release in $r/ReleaseList/TrackRelease >>> where $track_release/ReleaseLabelReference = $party/PartyReference >>> >>> return >>> for $party in $r/PartyList/Party >>> for $sound_recording in $r/ResourceList/SoundRecording >>> where $track_release/ReleaseResourceReference = >>> $sound_recording/ResourceReference >>> return >>> for $release in $r/ReleaseList/Release >>> where >>> $track_release/ReleaseResourceReference = >>> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe >>> sourceReference >>> return >>> <identity>... >>> >>> > Am I wrong, and would an additional value index help here? Or is my >>> > query >>> > just bad? >>> >>> You're computing every possible combiation of 5 items and then >>> filtering out the ones you want. >>> >>> Filtering out earlier would probably help. Also, moving the tests least >>> lilely to match to the outside would reduce the number of tests sooner. >>> >>> A value index might well help, but as Bridger wrote, check in the gUI >>> to see the query plan. BaseX might already be doing the sort of rewrite >>> i suggested. >>> >>> Liam >>> >>> >>> -- >>> Liam Quin, https://www.delightfulcomputing.com/ >>> Available for XML/Document/Information Architecture/XSLT/ >>> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. >>> Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org >>> >> >
BO
Bill Osmond21 Aug 2020 23:51 #
Hi all, I'm attempting to query a fairly large database, with 136,938 resources and a size of 12,257,686,099. The basex server itself is an AWS EC2 instance with 4 cores & 16 gigs of ram, using -Xmx12g. The database contains audio DDEX information which (to me at least) is fairly complicated XML. The query I'm running against the database works and gives me the result I want, but takes upwards of 15 minutes to execute. I've taken a look at the wiki documentation regarding indexes, but it's not clear to me that any of the non-default indexes would help for the query I'm running. That query is:
    declare namespace ernm="http://ddex.net/xml/ern/411";

    for $r in /ernm:NewReleaseMessage
    for $track_release in $r/ReleaseList/TrackRelease
    for $party in $r/PartyList/Party
    for $sound_recording in $r/ResourceList/SoundRecording
    for $release in $r/ReleaseList/Release
    where
      $track_release/ReleaseLabelReference = $party/PartyReference
      and $track_release/ReleaseResourceReference =
$sound_recording/ResourceReference
      and $track_release/ReleaseResourceReference =
$release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
    return
      <identity>
        <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
        <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/')
}</artist>
        <title>{ $sound_recording/DisplayTitleText/text() }</title>
        <album>{ $release/DisplayTitleText/text() }</album>
        <icpn>{ $release/ReleaseId/ICPN/text() }</icpn>
        <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
      </identity>
Am I wrong, and would an additional value index help here? Or is my query just bad? Thanks, Bill p.s. The BaseX GUI client is awesome - especially the treemap view. Really helps with wrangling these XML files!
BD
Bridger Dyson-Smith22 Aug 2020 00:00 #
Hi Bill, I won't claim to be any kind of query expert, but there are some things you can try to experiment with query speeds:
Quoted text · Bill Osmond · 40 lines
On Fri, Aug 21, 2020 at 3:52 PM Bill Osmond <bill at with.in> wrote: > Hi all, > I'm attempting to query a fairly large database, with 136,938 resources > and a size of 12,257,686,099. The basex server itself is an AWS EC2 > instance with 4 cores & 16 gigs of ram, using -Xmx12g. The database > contains audio DDEX information which (to me at least) is fairly > complicated XML. The query I'm running against the database works and gives > me the result I want, but takes upwards of 15 minutes to execute. I've > taken a look at the wiki documentation regarding indexes, but it's not > clear to me that any of the non-default indexes would help for the query > I'm running. That query is: > > declare namespace ernm="http://ddex.net/xml/ern/411"; > > for $r in /ernm:NewReleaseMessage > for $track_release in $r/ReleaseList/TrackRelease > for $party in $r/PartyList/Party > for $sound_recording in $r/ResourceList/SoundRecording > for $release in $r/ReleaseList/Release > where > $track_release/ReleaseLabelReference = $party/PartyReference > and $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference > and $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > return > <identity> > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') > }</artist> > <title>{ $sound_recording/DisplayTitleText/text() }</title> > <album>{ $release/DisplayTitleText/text() }</album> > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> > </identity> > > Am I wrong, and would an additional value index help here? Or is my query > just bad? > > It looks like you're trying to use text values -- do you have a full range
of indexes in your database? (text, attribute, token, and maybe full text) Also, have you tried running this query against a local instance of the database? The GUI can help steer you towards query optimizations in the Info window.
Quoted text · Bill Osmond · 6 lines
> Thanks, > Bill > > p.s. The BaseX GUI client is awesome - especially the treemap view. Really > helps with wrangling these XML files! >
I'm crunched for time at the moment so please excuse the hasty response. Best, Bridger
LQ
Liam R. E. Quinin reply to Bill Osmond, 21 Aug 2020, 23:5122 Aug 2020 00:48 #
Quoted text · Bill Osmond · 16 lines
On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: > > declare namespace ernm="http://ddex.net/xml/ern/411"; > > for $r in /ernm:NewReleaseMessage > for $track_release in $r/ReleaseList/TrackRelease > for $party in $r/PartyList/Party > for $sound_recording in $r/ResourceList/SoundRecording > for $release in $r/ReleaseList/Release > where > $track_release/ReleaseLabelReference = $party/PartyReference > and $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference > and $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release > ResourceReference
BaseX is probably smart enough to rewrite this, but check -
for $r in /ernm:NewReleaseMessage
 for $track_release in $r/ReleaseList/TrackRelease
 where $track_release/ReleaseLabelReference = $party/PartyReference

 return
   for $party in $r/PartyList/Party
    for $sound_recording in $r/ResourceList/SoundRecording
    where $track_release/ReleaseResourceReference =
          $sound_recording/ResourceReference
    return
      for $release in $r/ReleaseList/Release
      where
        $track_release/ReleaseResourceReference =
$release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe
sourceReference
        return
           <identity>...
Quoted text · Bill Osmond · 3 lines
> Am I wrong, and would an additional value index help here? Or is my > query > just bad?
You're computing every possible combiation of 5 items and then filtering out the ones you want. Filtering out earlier would probably help. Also, moving the tests least lilely to match to the outside would reduce the number of tests sooner. A value index might well help, but as Bridger wrote, check in the gUI to see the query plan. BaseX might already be doing the sort of rewrite i suggested. Liam
-- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
BO
Bill Osmond22 Aug 2020 00:53 #
Thank you both! I was in the middle of typing a response to Bridger when this came through, so while I digest both of your messages & test index addition/moving things around, I'll leave the output from the GUI info panel here - if I knew how to read it, it would no doubt point straight at the issue! I'll note that it runs much quicker locally as opposed to on server+via the python BaseXClient, but I don't know if that's because the GUI is stopping at 500k results, or what. Compiling: - rewrite context value to document-node() sequence: . -> (db:open-pre("umg-118061851424", 0), ...) - rewrite util:root(nodes) to document-node() sequence: util:root((db:open-pre("umg-118061851424", 0), ...)) -> (db:open-pre("umg-118061851424", 0), ...) - move where clause: $track_release_1/ReleaseLabelReference = $party_2/PartyReference - swap operands: PartyReference = $track_release_1/ReleaseLabelReference - rewrite to predicate: PartyReference = $track_release_1/ReleaseLabelReference - move where clause: $track_release_1/ReleaseResourceReference = $sound_recording_3/ResourceReference - swap operands: ResourceReference = $track_release_1/ReleaseResourceReference - rewrite to predicate: ResourceReference = $track_release_1/ReleaseResourceReference - swap operands: ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference = $track_release_1/Rel... - rewrite to predicate: ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference = $track_release_1/Rel... - inline for $release_4 in $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/Rele... Optimized Query:
for $r_0 in (db:open-pre("umg-118061851424", 0),
...)/ernm:NewReleaseMessage for $track_release_1 in
$r_0/ReleaseList/TrackRelease for $party_2 in
$r_0/PartyList/Party[PartyReference =
$track_release_1/ReleaseLabelReference] for $sound_recording_3 in
$r_0/ResourceList/SoundRecording[ResourceReference =
$track_release_1/ReleaseResourceReference] return
$r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
= $track_release_1/ReleaseResourceReference] ! <identity> <isrc> {
$track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> {
string-join($sound_recording_3/DisplayArtistName, "/") } </artist> <title>
{ $sound_recording_3/DisplayTitleText/text() } </title> <album> {
DisplayTitleText/text() } </album> <icpn> { ReleaseId/ICPN/text() } </icpn>
<sublabel> { $party_2/PartyName/FullName/text() } </sublabel> </identity>
Query:
declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in
/ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease
for $party in $r/PartyList/Party for $sound_recording in
$r/ResourceList/SoundRecording for $release in $r/ReleaseList/Release where
$track_release/ReleaseLabelReference = $party/PartyReference and
$track_release/ReleaseResourceReference =
$sound_recording/ResourceReference and
$track_release/ReleaseResourceReference =
$release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
return <identity> <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
<artist>{ fn:string-join($sound_recording/DisplayArtistName, '/')
}</artist> <title>{ $sound_recording/DisplayTitleText/text() }</title>
<album>{ $release/DisplayTitleText/text() }</album> <icpn>{
$release/ReleaseId/ICPN/text() }</icpn> <sublabel>{
$party/PartyName/FullName/text() }</sublabel> </identity>
Result: - Hit(s): 500000 Items - Updated: 0 Items - Printed: 8192 kB - Read Locking: umg-118061851424 - Write Locking: (none) Timing: - Parsing: 2.88 ms - Compiling: 4.38 ms - Evaluating: 114935.22 ms - Printing: 114.59 ms - Total Time: 115057.07 ms Query Plan:
<QueryPlan compiled="true" updating="false">
  <GFLWOR type="element()*">
    <For type="element()" size="1" name="$r" id="0">
      <IterPath type="element()*" database="umg-118061851424">
        <DBNodeSeq type="document-node()+" size="136938"
database="umg-118061851424">
          <DBNode pre="0" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="59" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="118" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="177" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="236" type="document-node()" size="1"
database="umg-118061851424"/>
        </DBNodeSeq>
        <IterStep axis="child" test="ernm:NewReleaseMessage"
type="element()*"/>
      </IterPath>
    </For>
    <For type="element()" size="1" name="$track_release" id="1">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ReleaseList" type="element()*"/>
        <IterStep axis="child" test="TrackRelease" type="element()*"/>
      </IterPath>
    </For>
    <For type="element()" size="1" name="$party" id="2">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="PartyList" type="element()*"/>
        <IterStep axis="child" test="Party" type="element()*">
          <CmpHashG op="=" type="xs:boolean" size="1">
            <SingleIterPath type="element()*" database="umg-118061851424">
              <IterStep axis="child" test="PartyReference"
type="element()*"/>
            </SingleIterPath>
            <IterPath type="element()*" database="umg-118061851424">
              <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
              <IterStep axis="child" test="ReleaseLabelReference"
type="element()*"/>
            </IterPath>
          </CmpHashG>
        </IterStep>
      </IterPath>
    </For>
    <For type="element()" size="1" name="$sound_recording" id="3">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ResourceList" type="element()*"/>
        <IterStep axis="child" test="SoundRecording" type="element()*">
          <CmpHashG op="=" type="xs:boolean" size="1">
            <SingleIterPath type="element()*" database="umg-118061851424">
              <IterStep axis="child" test="ResourceReference"
type="element()*"/>
            </SingleIterPath>
            <IterPath type="element()*" database="umg-118061851424">
              <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
              <IterStep axis="child" test="ReleaseResourceReference"
type="element()*"/>
            </IterPath>
          </CmpHashG>
        </IterStep>
      </IterPath>
    </For>
    <DualMap type="element()*">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ReleaseList" type="element()*"/>
        <IterStep axis="child" test="Release" type="element()*">
          <CmpHashG op="=" type="xs:boolean" size="1">
            <IterPath type="element()*" database="umg-118061851424">
              <IterStep axis="child" test="ResourceGroup"
type="element()*"/>
              <IterStep axis="child" test="ResourceGroup"
type="element()*"/>
              <IterStep axis="child" test="ResourceGroupContentItem"
type="element()*"/>
              <IterStep axis="child" test="ReleaseResourceReference"
type="element()*"/>
            </IterPath>
            <IterPath type="element()*" database="umg-118061851424">
              <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
              <IterStep axis="child" test="ReleaseResourceReference"
type="element()*"/>
            </IterPath>
          </CmpHashG>
        </IterStep>
      </IterPath>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">identity</QNm>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">isrc</QNm>
          <IterPath type="text()*" database="umg-118061851424">
            <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
            <IterStep axis="child" test="ReleaseId" type="element()*"/>
            <IterStep axis="child" test="ISRC" type="element()*"/>
            <IterStep axis="child" test="text()" type="text()*"/>
          </IterPath>
        </CElem>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">artist</QNm>
          <FnStringJoin name="string-join" type="xs:string" size="1">
            <IterPath type="element()*" database="umg-118061851424">
              <VarRef type="element()" size="1" database="umg-118061851424"
name="$sound_recording" id="3"/>
              <IterStep axis="child" test="DisplayArtistName"
type="element()*"/>
            </IterPath>
            <Str type="xs:string" size="1">/</Str>
          </FnStringJoin>
        </CElem>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">title</QNm>
          <IterPath type="text()*" database="umg-118061851424">
            <VarRef type="element()" size="1" database="umg-118061851424"
name="$sound_recording" id="3"/>
            <IterStep axis="child" test="DisplayTitleText"
type="element()*"/>
            <IterStep axis="child" test="text()" type="text()*"/>
          </IterPath>
        </CElem>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">album</QNm>
          <IterPath type="text()*" database="umg-118061851424">
            <IterStep axis="child" test="DisplayTitleText"
type="element()*"/>
            <IterStep axis="child" test="text()" type="text()*"/>
          </IterPath>
        </CElem>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">icpn</QNm>
          <IterPath type="text()*" database="umg-118061851424">
            <IterStep axis="child" test="ReleaseId" type="element()*"/>
            <IterStep axis="child" test="ICPN" type="element()*"/>
            <IterStep axis="child" test="text()" type="text()*"/>
          </IterPath>
        </CElem>
        <CElem type="element()" size="1">
          <QNm type="xs:QName" size="1">sublabel</QNm>
          <IterPath type="text()*" database="umg-118061851424">
            <VarRef type="element()" size="1" database="umg-118061851424"
name="$party" id="2"/>
            <IterStep axis="child" test="PartyName" type="element()*"/>
            <IterStep axis="child" test="FullName" type="element()*"/>
            <IterStep axis="child" test="text()" type="text()*"/>
          </IterPath>
        </CElem>
      </CElem>
    </DualMap>
  </GFLWOR>
</QueryPlan>
Quoted text · Liam R. E. Quin · 63 lines
On Fri, Aug 21, 2020 at 1:48 PM Liam R. E. Quin <liam at fromoldbooks.org> wrote: > On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: > > > > declare namespace ernm="http://ddex.net/xml/ern/411"; > > > > for $r in /ernm:NewReleaseMessage > > for $track_release in $r/ReleaseList/TrackRelease > > for $party in $r/PartyList/Party > > for $sound_recording in $r/ResourceList/SoundRecording > > for $release in $r/ReleaseList/Release > > where > > $track_release/ReleaseLabelReference = $party/PartyReference > > and $track_release/ReleaseResourceReference = > > $sound_recording/ResourceReference > > and $track_release/ReleaseResourceReference = > > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release > > ResourceReference > > BaseX is probably smart enough to rewrite this, but check - > > for $r in /ernm:NewReleaseMessage > for $track_release in $r/ReleaseList/TrackRelease > where $track_release/ReleaseLabelReference = $party/PartyReference > > return > for $party in $r/PartyList/Party > for $sound_recording in $r/ResourceList/SoundRecording > where $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference > return > for $release in $r/ReleaseList/Release > where > $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe > sourceReference > return > <identity>... > > > Am I wrong, and would an additional value index help here? Or is my > > query > > just bad? > > You're computing every possible combiation of 5 items and then > filtering out the ones you want. > > Filtering out earlier would probably help. Also, moving the tests least > lilely to match to the outside would reduce the number of tests sooner. > > A value index might well help, but as Bridger wrote, check in the gUI > to see the query plan. BaseX might already be doing the sort of rewrite > i suggested. > > Liam > > > -- > Liam Quin, https://www.delightfulcomputing.com/ > Available for XML/Document/Information Architecture/XSLT/ > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org > >
BO
Bill Osmond22 Aug 2020 01:26 #
The indentation levels and multiple returns in your suggested query alone has helped me in understanding what's actually going on, and I've rewritten the query mostly as you suggest:
for $r in /ernm:NewReleaseMessage
  for $track_release in $r/ReleaseList/TrackRelease
  where $track_release/ReleaseLabelReference =
$r/PartyList/Party/PartyReference
  return
    for $party in $r/PartyList/Party
      for $sound_recording in $r/ResourceList/SoundRecording
      where $track_release/ReleaseResourceReference =
$sound_recording/ResourceReference
      return
        for $release in $r/ReleaseList/Release
        where $track_release/ReleaseResourceReference =
$release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
        return
  <identity>
    <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
    <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/')
}</artist>
    <title>{ $sound_recording/DisplayTitleText/text() }</title>
    <album>{ $release/DisplayTitleText/text() }</album>
    <icpn>{ $release/ReleaseId/ICPN/text() }</icpn>
    <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
  </identity>
I say "mostly" because at the first 'where' statement, I had to replace the $party/PartyReference on the right side of the = with an explicit reference from $r, because $party isn't defined until 2 lines further down. The query does work and appears to be giving the right results, however the performance is basically the same: 127,698.27 ms for this run vs. 114,935.22 ms for the original. I'll try shuffling things around next!
Quoted text · Bill Osmond · 310 lines
On Fri, Aug 21, 2020 at 1:52 PM Bill Osmond <bill at with.in> wrote: > Thank you both! I was in the middle of typing a response to Bridger when > this came through, so while I digest both of your messages & test index > addition/moving things around, I'll leave the output from the GUI info > panel here - if I knew how to read it, it would no doubt point straight at > the issue! I'll note that it runs much quicker locally as opposed to on > server+via the python BaseXClient, but I don't know if that's because the > GUI is stopping at 500k results, or what. > > Compiling: > - rewrite context value to document-node() sequence: . -> > (db:open-pre("umg-118061851424", 0), ...) > - rewrite util:root(nodes) to document-node() sequence: > util:root((db:open-pre("umg-118061851424", 0), ...)) -> > (db:open-pre("umg-118061851424", 0), ...) > - move where clause: $track_release_1/ReleaseLabelReference = > $party_2/PartyReference > - swap operands: PartyReference = $track_release_1/ReleaseLabelReference > - rewrite to predicate: PartyReference = > $track_release_1/ReleaseLabelReference > - move where clause: $track_release_1/ReleaseResourceReference = > $sound_recording_3/ResourceReference > - swap operands: ResourceReference = > $track_release_1/ReleaseResourceReference > - rewrite to predicate: ResourceReference = > $track_release_1/ReleaseResourceReference > - swap operands: > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/Rel... > - rewrite to predicate: > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/Rel... > - inline for $release_4 in > $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/Rele... > > Optimized Query: > for $r_0 in (db:open-pre("umg-118061851424", 0), > ...)/ernm:NewReleaseMessage for $track_release_1 in > $r_0/ReleaseList/TrackRelease for $party_2 in > $r_0/PartyList/Party[PartyReference = > $track_release_1/ReleaseLabelReference] for $sound_recording_3 in > $r_0/ResourceList/SoundRecording[ResourceReference = > $track_release_1/ReleaseResourceReference] return > $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/ReleaseResourceReference] ! <identity> <isrc> { > $track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> { > string-join($sound_recording_3/DisplayArtistName, "/") } </artist> <title> > { $sound_recording_3/DisplayTitleText/text() } </title> <album> { > DisplayTitleText/text() } </album> <icpn> { ReleaseId/ICPN/text() } </icpn> > <sublabel> { $party_2/PartyName/FullName/text() } </sublabel> </identity> > > Query: > declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in > /ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease > for $party in $r/PartyList/Party for $sound_recording in > $r/ResourceList/SoundRecording for $release in $r/ReleaseList/Release where > $track_release/ReleaseLabelReference = $party/PartyReference and > $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference and > $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > return <identity> <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') > }</artist> <title>{ $sound_recording/DisplayTitleText/text() }</title> > <album>{ $release/DisplayTitleText/text() }</album> <icpn>{ > $release/ReleaseId/ICPN/text() }</icpn> <sublabel>{ > $party/PartyName/FullName/text() }</sublabel> </identity> > > Result: > - Hit(s): 500000 Items > - Updated: 0 Items > - Printed: 8192 kB > - Read Locking: umg-118061851424 > - Write Locking: (none) > > Timing: > - Parsing: 2.88 ms > - Compiling: 4.38 ms > - Evaluating: 114935.22 ms > - Printing: 114.59 ms > - Total Time: 115057.07 ms > > Query Plan: > <QueryPlan compiled="true" updating="false"> > <GFLWOR type="element()*"> > <For type="element()" size="1" name="$r" id="0"> > <IterPath type="element()*" database="umg-118061851424"> > <DBNodeSeq type="document-node()+" size="136938" > database="umg-118061851424"> > <DBNode pre="0" type="document-node()" size="1" > database="umg-118061851424"/> > <DBNode pre="59" type="document-node()" size="1" > database="umg-118061851424"/> > <DBNode pre="118" type="document-node()" size="1" > database="umg-118061851424"/> > <DBNode pre="177" type="document-node()" size="1" > database="umg-118061851424"/> > <DBNode pre="236" type="document-node()" size="1" > database="umg-118061851424"/> > </DBNodeSeq> > <IterStep axis="child" test="ernm:NewReleaseMessage" > type="element()*"/> > </IterPath> > </For> > <For type="element()" size="1" name="$track_release" id="1"> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > <IterStep axis="child" test="ReleaseList" type="element()*"/> > <IterStep axis="child" test="TrackRelease" type="element()*"/> > </IterPath> > </For> > <For type="element()" size="1" name="$party" id="2"> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > <IterStep axis="child" test="PartyList" type="element()*"/> > <IterStep axis="child" test="Party" type="element()*"> > <CmpHashG op="=" type="xs:boolean" size="1"> > <SingleIterPath type="element()*" database="umg-118061851424"> > <IterStep axis="child" test="PartyReference" > type="element()*"/> > </SingleIterPath> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > <IterStep axis="child" test="ReleaseLabelReference" > type="element()*"/> > </IterPath> > </CmpHashG> > </IterStep> > </IterPath> > </For> > <For type="element()" size="1" name="$sound_recording" id="3"> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > <IterStep axis="child" test="ResourceList" type="element()*"/> > <IterStep axis="child" test="SoundRecording" type="element()*"> > <CmpHashG op="=" type="xs:boolean" size="1"> > <SingleIterPath type="element()*" database="umg-118061851424"> > <IterStep axis="child" test="ResourceReference" > type="element()*"/> > </SingleIterPath> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > </IterPath> > </CmpHashG> > </IterStep> > </IterPath> > </For> > <DualMap type="element()*"> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > <IterStep axis="child" test="ReleaseList" type="element()*"/> > <IterStep axis="child" test="Release" type="element()*"> > <CmpHashG op="=" type="xs:boolean" size="1"> > <IterPath type="element()*" database="umg-118061851424"> > <IterStep axis="child" test="ResourceGroup" > type="element()*"/> > <IterStep axis="child" test="ResourceGroup" > type="element()*"/> > <IterStep axis="child" test="ResourceGroupContentItem" > type="element()*"/> > <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > </IterPath> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > </IterPath> > </CmpHashG> > </IterStep> > </IterPath> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">identity</QNm> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">isrc</QNm> > <IterPath type="text()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$track_release" id="1"/> > <IterStep axis="child" test="ReleaseId" type="element()*"/> > <IterStep axis="child" test="ISRC" type="element()*"/> > <IterStep axis="child" test="text()" type="text()*"/> > </IterPath> > </CElem> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">artist</QNm> > <FnStringJoin name="string-join" type="xs:string" size="1"> > <IterPath type="element()*" database="umg-118061851424"> > <VarRef type="element()" size="1" > database="umg-118061851424" name="$sound_recording" id="3"/> > <IterStep axis="child" test="DisplayArtistName" > type="element()*"/> > </IterPath> > <Str type="xs:string" size="1">/</Str> > </FnStringJoin> > </CElem> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">title</QNm> > <IterPath type="text()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$sound_recording" id="3"/> > <IterStep axis="child" test="DisplayTitleText" > type="element()*"/> > <IterStep axis="child" test="text()" type="text()*"/> > </IterPath> > </CElem> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">album</QNm> > <IterPath type="text()*" database="umg-118061851424"> > <IterStep axis="child" test="DisplayTitleText" > type="element()*"/> > <IterStep axis="child" test="text()" type="text()*"/> > </IterPath> > </CElem> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">icpn</QNm> > <IterPath type="text()*" database="umg-118061851424"> > <IterStep axis="child" test="ReleaseId" type="element()*"/> > <IterStep axis="child" test="ICPN" type="element()*"/> > <IterStep axis="child" test="text()" type="text()*"/> > </IterPath> > </CElem> > <CElem type="element()" size="1"> > <QNm type="xs:QName" size="1">sublabel</QNm> > <IterPath type="text()*" database="umg-118061851424"> > <VarRef type="element()" size="1" database="umg-118061851424" > name="$party" id="2"/> > <IterStep axis="child" test="PartyName" type="element()*"/> > <IterStep axis="child" test="FullName" type="element()*"/> > <IterStep axis="child" test="text()" type="text()*"/> > </IterPath> > </CElem> > </CElem> > </DualMap> > </GFLWOR> > </QueryPlan> > > On Fri, Aug 21, 2020 at 1:48 PM Liam R. E. Quin <liam at fromoldbooks.org> > wrote: > >> On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: >> > >> > declare namespace ernm="http://ddex.net/xml/ern/411"; >> > >> > for $r in /ernm:NewReleaseMessage >> > for $track_release in $r/ReleaseList/TrackRelease >> > for $party in $r/PartyList/Party >> > for $sound_recording in $r/ResourceList/SoundRecording >> > for $release in $r/ReleaseList/Release >> > where >> > $track_release/ReleaseLabelReference = $party/PartyReference >> > and $track_release/ReleaseResourceReference = >> > $sound_recording/ResourceReference >> > and $track_release/ReleaseResourceReference = >> > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release >> > ResourceReference >> >> BaseX is probably smart enough to rewrite this, but check - >> >> for $r in /ernm:NewReleaseMessage >> for $track_release in $r/ReleaseList/TrackRelease >> where $track_release/ReleaseLabelReference = $party/PartyReference >> >> return >> for $party in $r/PartyList/Party >> for $sound_recording in $r/ResourceList/SoundRecording >> where $track_release/ReleaseResourceReference = >> $sound_recording/ResourceReference >> return >> for $release in $r/ReleaseList/Release >> where >> $track_release/ReleaseResourceReference = >> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe >> sourceReference >> return >> <identity>... >> >> > Am I wrong, and would an additional value index help here? Or is my >> > query >> > just bad? >> >> You're computing every possible combiation of 5 items and then >> filtering out the ones you want. >> >> Filtering out earlier would probably help. Also, moving the tests least >> lilely to match to the outside would reduce the number of tests sooner. >> >> A value index might well help, but as Bridger wrote, check in the gUI >> to see the query plan. BaseX might already be doing the sort of rewrite >> i suggested. >> >> Liam >> >> >> -- >> Liam Quin, https://www.delightfulcomputing.com/ >> Available for XML/Document/Information Architecture/XSLT/ >> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. >> Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org >> >> >
BO
Bill Osmondin reply to Christian Grün, 21 Aug 2020, 23:3822 Aug 2020 01:48 #
Thank you for the suggestion Christian, and thank you for starting this project, which saves us from pains that we no doubt would have suffered were we to use Oracle XML DB! I'll throw explicit text() steps in, and try to reduce the number of loops I'm doing. Conceptually there are really only two loops: "for each document, iterate over each track, and pull out all of the other information referenced by that track" Below is a single sample document. I wish I could make it smaller, but such is the problem I'm dealing with :)
<?xml version="1.0" encoding="UTF-8"?>
<ernm:NewReleaseMessage xmlns:ernm="http://ddex.net/xml/ern/411" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
                        LanguageAndScriptCode="en"
                        ReleaseProfileVersionId="Audio"
                        xsi:schemaLocation="http://ddex.net/xml/ern/411
http://ddex.net/xml/ern/411/release-notification.xsd">
    <MessageHeader>
        <MessageThreadId>xxx</MessageThreadId>
        <MessageId>xxx</MessageId>
        <MessageSender>
            <PartyId>xxx</PartyId>
            <PartyName>
                <FullName>xxx</FullName>
            </PartyName>
        </MessageSender>
        <MessageRecipient>
            <PartyId>xxx</PartyId>
            <PartyName>
                <FullName>xxx</FullName>
            </PartyName>
        </MessageRecipient>
        <MessageCreatedDateTime>xxx</MessageCreatedDateTime>
        <MessageControlType>TestMessage</MessageControlType>
    </MessageHeader>
    <PartyList>
        <Party>
            <PartyReference>P1</PartyReference>
            <PartyName>
                <FullName>Sandy &amp; Junior</FullName>
                <KeyName>Sandy &amp; Junior</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P2</PartyReference>
            <PartyName>
                <FullName>Moogie Canazio</FullName>
                <NamesBeforeKeyName>Moogie</NamesBeforeKeyName>
                <KeyName>Canazio</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P3</PartyReference>
            <PartyName>
                <FullName>Sandy</FullName>
                <KeyName>Sandy</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P4</PartyReference>
            <PartyName>
                <FullName>Junior</FullName>
                <KeyName>Junior</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P5</PartyReference>
            <PartyName>
                <FullName>Liah Soares</FullName>
                <NamesBeforeKeyName>Liah</NamesBeforeKeyName>
                <KeyName>Soares</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P6</PartyReference>
            <PartyName>
                <FullName>Márcio Cruz</FullName>
                <NamesBeforeKeyName>Márcio</NamesBeforeKeyName>
                <KeyName>Cruz</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P7</PartyReference>
            <PartyName>
                <FullName>Pedro Barezzi</FullName>
                <NamesBeforeKeyName>Pedro</NamesBeforeKeyName>
                <KeyName>Barezzi</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P8</PartyReference>
            <PartyName>
                <FullName>Danimar</FullName>
                <KeyName>Danimar</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P9</PartyReference>
            <PartyName>
                <FullName>Junior</FullName>
                <KeyName>Junior</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P10</PartyReference>
            <PartyName>
                <FullName>John Ondrasik</FullName>
                <NamesBeforeKeyName>John</NamesBeforeKeyName>
                <KeyName>Ondrasik</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P11</PartyReference>
            <PartyName>
                <FullName>Mauricio Gaetani</FullName>
                <NamesBeforeKeyName>Mauricio</NamesBeforeKeyName>
                <KeyName>Gaetani</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P12</PartyReference>
            <PartyName>
                <FullName>Otavio De Moraes</FullName>
                <NamesBeforeKeyName>Otavio De</NamesBeforeKeyName>
                <KeyName>Moraes</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P13</PartyReference>
            <PartyName>
                <FullName>Francesco Boccia</FullName>
                <NamesBeforeKeyName>Francesco</NamesBeforeKeyName>
                <KeyName>Boccia</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P14</PartyReference>
            <PartyName>
                <FullName>Gianfranco Calliendo</FullName>
                <NamesBeforeKeyName>Gianfranco</NamesBeforeKeyName>
                <KeyName>Calliendo</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P15</PartyReference>
            <PartyName>
                <FullName>Ciro Esposito</FullName>
                <NamesBeforeKeyName>Ciro</NamesBeforeKeyName>
                <KeyName>Esposito</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P16</PartyReference>
            <PartyName>
                <FullName>Ricardo Moreira</FullName>
                <NamesBeforeKeyName>Ricardo</NamesBeforeKeyName>
                <KeyName>Moreira</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P17</PartyReference>
            <PartyName>
                <FullName>Alanis Morissette</FullName>
                <NamesBeforeKeyName>Alanis</NamesBeforeKeyName>
                <KeyName>Morissette</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P18</PartyReference>
            <PartyName>
                <FullName>Roberto Carlos</FullName>
                <NamesBeforeKeyName>Roberto</NamesBeforeKeyName>
                <KeyName>Carlos</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P19</PartyReference>
            <PartyName>
                <FullName>Sandy</FullName>
                <KeyName>Sandy</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P20</PartyReference>
            <PartyName>
                <FullName>Guilherme Lamounier</FullName>
                <NamesBeforeKeyName>Guilherme</NamesBeforeKeyName>
                <KeyName>Lamounier</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P21</PartyReference>
            <PartyName>
                <FullName>Nando</FullName>
                <KeyName>Nando</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P22</PartyReference>
            <PartyName>
                <FullName>Kiko</FullName>
                <KeyName>Kiko</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P23</PartyReference>
            <PartyName>
                <FullName>Ricardo Feghali</FullName>
                <NamesBeforeKeyName>Ricardo</NamesBeforeKeyName>
                <KeyName>Feghali</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P24</PartyReference>
            <PartyName>
                <FullName>Per Nylen</FullName>
                <NamesBeforeKeyName>Per</NamesBeforeKeyName>
                <KeyName>Nylen</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P25</PartyReference>
            <PartyName>
                <FullName>Andreas Carlsson</FullName>
                <NamesBeforeKeyName>Andreas</NamesBeforeKeyName>
                <KeyName>Carlsson</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P26</PartyReference>
            <PartyName>
                <FullName>Julie Morrison</FullName>
                <NamesBeforeKeyName>Julie</NamesBeforeKeyName>
                <KeyName>Morrison</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P27</PartyReference>
            <PartyName>
                <FullName>Jane Vaughn</FullName>
                <KeyName>Jane Vaughn</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P28</PartyReference>
            <PartyName>
                <FullName>Karsten Dahlgaard</FullName>
                <NamesBeforeKeyName>Karsten</NamesBeforeKeyName>
                <KeyName>Dahlgaard</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P29</PartyReference>
            <PartyName>
                <FullName>Johnny Pedersen</FullName>
                <NamesBeforeKeyName>Johnny</NamesBeforeKeyName>
                <KeyName>Pedersen</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P30</PartyReference>
            <PartyName>
                <FullName>Milton Guedes</FullName>
                <NamesBeforeKeyName>Milton</NamesBeforeKeyName>
                <KeyName>Guedes</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P31</PartyReference>
            <PartyName>
                <FullName>Paulinho Galvão</FullName>
                <NamesBeforeKeyName>Paulinho</NamesBeforeKeyName>
                <KeyName>Galvão</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P32</PartyReference>
            <PartyName>
                <FullName>Lloyd &quot;Gitsy&quot; Oliver Willis</FullName>
                <NamesBeforeKeyName>Lloyd &quot;Gitsy&quot;
Oliver</NamesBeforeKeyName>
                <KeyName>Willis</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P33</PartyReference>
            <PartyName>
                <FullName>Robbie Shakespeare</FullName>
                <NamesBeforeKeyName>Robbie</NamesBeforeKeyName>
                <KeyName>Shakespeare</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P34</PartyReference>
            <PartyName>
                <FullName>Everton Bonner</FullName>
                <NamesBeforeKeyName>Everton</NamesBeforeKeyName>
                <KeyName>Bonner</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P35</PartyReference>
            <PartyName>
                <FullName>Joseph Bonner</FullName>
                <NamesBeforeKeyName>Joseph</NamesBeforeKeyName>
                <KeyName>Bonner</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P36</PartyReference>
            <PartyName>
                <FullName>John Taylor</FullName>
                <NamesBeforeKeyName>John</NamesBeforeKeyName>
                <KeyName>Taylor</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P37</PartyReference>
            <PartyName>
                <FullName>Sly Dunbar</FullName>
                <NamesBeforeKeyName>Sly</NamesBeforeKeyName>
                <KeyName>Dunbar</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P38</PartyReference>
            <PartyName>
                <FullName>Pedro Abrunhosa</FullName>
                <NamesBeforeKeyName>Pedro</NamesBeforeKeyName>
                <KeyName>Abrunhosa</KeyName>
            </PartyName>
        </Party>
        <Party>
            <PartyReference>P39</PartyReference>
            <PartyName>
                <FullName>Universal Music International Ltda.</FullName>
            </PartyName>
        </Party>
    </PartyList>
    <ResourceList>
        <SoundRecording>
            <ResourceReference>A1</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200733</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Não Dá Pra Não
Pensar</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Não Dá Pra Não Pensar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Não Dá Pra Não Pensar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M50S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T15</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M50.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T15_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>D0DA7A0C4FBB86CFF71FE185E7D04EDB</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A2</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200734</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Nada É Por
Acaso</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Nada É Por Acaso</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Nada É Por Acaso</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P5</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P6</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="6">
                <ContributorPartyReference>P7</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="7">
                <ContributorPartyReference>P8</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M21S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T14</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M21.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T14_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>0D7EE7708A5CE62C75CBB9B5754C1B4D</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A3</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200724</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Super-Herói (Não É
Fácil)</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Super-Herói (Não É Fácil)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Super-Herói (Não É Fácil)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P9</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P10</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P11</ContributorPartyReference>
                <Role>Translator</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M14S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T13</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M13.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T13_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>E3EAC70ED4B59307191AE87D80084548</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A4</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200744</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Deixa Eu
Tentar</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Deixa Eu Tentar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Deixa Eu Tentar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P12</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M53S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T12</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M53.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T12_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>764951DA059C70123A726D329FF5462A</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A5</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200735</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Quando Você Passa (Turu
Turu)</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Quando Você Passa (Turu Turu)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Quando Você Passa (Turu Turu)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P13</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P14</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="6">
                <ContributorPartyReference>P15</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="7">
                <ContributorPartyReference>P16</ContributorPartyReference>
                <Role>Translator</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT3M52S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T11</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H3M51.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T11_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>C037C6F6579786DA17817D2CA43975E5</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A6</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200743</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Uninvited</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Uninvited</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Uninvited</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P17</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M47S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>en</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T10</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M46.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T10_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>D6B0CC56A1FE3B1953C78786D933058B</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A7</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200725</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Como É Grande O Meu Amor Por
Você</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Como É Grande O Meu Amor Por Você</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Como É Grande O Meu Amor Por Você</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P18</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT2M50S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T9</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H2M49.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T9_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>7E752408F66B43CBE9EBA14B59A52BF8</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A8</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200736</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Enrosca</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Enrosca</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Enrosca</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P19</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P20</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT3M32S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T8</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H3M31.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T8_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>C0657E94D28F126B6A8796425B2CFC5B</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A9</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200737</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">A Lenda</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>A Lenda</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>A Lenda</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P21</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P22</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="6">
                <ContributorPartyReference>P23</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M38S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T7</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M37.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T7_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>BE335EAE070F07470B785ABA05451BE6</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A10</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200738</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Words Are Not
Enough</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Words Are Not Enough</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Words Are Not Enough</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P24</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P25</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT3M34S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>en</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T6</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H3M34.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T6_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>4EDBF599C3C2876D83B0AF877AF7577D</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A11</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200739</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Love Never
Fails</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Love Never Fails</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Love Never Fails</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P26</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P27</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="6">
                <ContributorPartyReference>P28</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="7">
                <ContributorPartyReference>P29</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M10S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>en</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T5</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M10.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T5_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>23A44A17289D6CC6796998DE5081E465</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A12</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200740</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">O Amor Faz</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>O Amor Faz</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>O Amor Faz</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P11</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M36S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T4</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M35.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T4_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>DFF2D6AEC7D87F8D4D317B1372D4CC97</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A13</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200741</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">A Gente Dá
Certo</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>A Gente Dá Certo</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>A Gente Dá Certo</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P30</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT4M17S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T3</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H4M17.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T3_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>C83A3CE4AAD1F3E4407E6CEA7C892B12</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <SoundRecording>
            <ResourceReference>A14</ResourceReference>
            <Type>MusicalWorkSoundRecording</Type>
            <ResourceId>
                <ISRC>BRMCA0200742</ISRC>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Cai A Chuva / Me Diz /
Citação: Não Posso Mais</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso
Mais</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso
Mais</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P2</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Producer">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="2">
                <ContributorPartyReference>P3</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="3">
                <ContributorPartyReference>P4</ContributorPartyReference>
                <Role>AssociatedPerformer</Role>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="Vocalist">UserDefined</Role>
            </Contributor>
            <Contributor SequenceNumber="4">
                <ContributorPartyReference>P30</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
                <Role>Translator</Role>
            </Contributor>
            <Contributor SequenceNumber="5">
                <ContributorPartyReference>P31</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="6">
                <ContributorPartyReference>P32</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="7">
                <ContributorPartyReference>P33</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="8">
                <ContributorPartyReference>P34</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="9">
                <ContributorPartyReference>P35</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="10">
                <ContributorPartyReference>P36</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="11">
                <ContributorPartyReference>P37</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <Contributor SequenceNumber="12">
                <ContributorPartyReference>P38</ContributorPartyReference>
                <Role>ComposerLyricist</Role>
            </Contributor>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music International</PLineCompany>
                <PLineText>℗ 2002 Universal Music International</PLineText>
            </PLine>
            <Duration>PT5M14S</Duration>
            <CreationDate ApplicableTerritoryCode="BR"
LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12
            </CreationDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <LanguageOfPerformance>pt</LanguageOfPerformance>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T2</TechnicalResourceDetailsReference>
                <AudioCodecType>FLAC</AudioCodecType>
                <NumberOfChannels>2</NumberOfChannels>
                <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate>
                <BitsPerSample>16</BitsPerSample>
                <Duration>PT0H5M13.000S</Duration>
                <IsPreview>false</IsPreview>
                <File>
                    <URI>00044006704722_T2_audtrk.flac</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>5DC6BD4B66CE9AC8376210A3D497605A</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </SoundRecording>
        <Image>
            <ResourceReference>A15</ResourceReference>
            <Type>FrontCoverImage</Type>
            <ResourceId>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">06UMGIM33173</ProprietaryId>
            </ResourceId>
            <DisplayTitleText IsDefault="true">Sandy &amp; Júnior Ao Vivo
No Maracanã</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Sandy &amp; Júnior Ao Vivo No
Maracanã</TitleText>
                <SubTitle>Ao Vivo</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Sandy &amp; Júnior Ao Vivo No
Maracanã</TitleText>
                <SubTitle>Ao Vivo</SubTitle>
            </AdditionalTitle>
            <Contributor SequenceNumber="1">
                <ContributorPartyReference>P1</ContributorPartyReference>
                <Role Namespace="DPID:PADPIDA2013042401U"
UserDefinedValue="MainArtist">UserDefined</Role>
            </Contributor>
            <CLine IsDefault="true">
                <Year>2002</Year>
                <CLineCompany>Universal Music International</CLineCompany>
                <CLineText>© 2002 Universal Music International</CLineText>
            </CLine>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <TechnicalDetails>

<TechnicalResourceDetailsReference>T1</TechnicalResourceDetailsReference>
                <ImageCodecType>JPEG</ImageCodecType>
                <ImageHeight UnitOfMeasure="Pixel">1408</ImageHeight>
                <ImageWidth UnitOfMeasure="Pixel">1422</ImageWidth>
                <File>
                    <URI>06UMGIM33173_T1_cvrart.jpg</URI>
                    <HashSum>
                        <Algorithm>MD5</Algorithm>

<HashSumValue>f6b0cdeaff97c8c438f940a12f3060c3</HashSumValue>
                    </HashSum>
                </File>
            </TechnicalDetails>
        </Image>
    </ResourceList>
    <ReleaseList>
        <Release>
            <ReleaseReference>R0</ReleaseReference>
            <ReleaseType>Album</ReleaseType>
            <ReleaseId>
                <ICPN>00044006704722</ICPN>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Ao Vivo No
Maracanã</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Ao Vivo No Maracanã</TitleText>
                <SubTitle>Ao Vivo</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Ao Vivo No Maracanã</TitleText>
                <SubTitle>Ao Vivo</SubTitle>
            </AdditionalTitle>
            <DisplayArtistName IsDefault="true">Sandy &amp;
Junior</DisplayArtistName>
            <DisplayArtist SequenceNumber="1">
                <ArtistPartyReference>P1</ArtistPartyReference>
                <DisplayArtistRole>MainArtist</DisplayArtistRole>
            </DisplayArtist>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <PLine IsDefault="true">
                <Year>2002</Year>
                <PLineCompany>Universal Music Ltda</PLineCompany>
                <PLineText>℗ 2002 Universal Music Ltda</PLineText>
            </PLine>
            <CLine IsDefault="true">
                <Year>2002</Year>
                <CLineCompany>Universal Music Ltda</CLineCompany>
                <CLineText>© 2002 Universal Music Ltda</CLineText>
            </CLine>
            <Duration>PT59M47S</Duration>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
            <ReleaseDate IsDefault="true">2006-03-07</ReleaseDate>
            <OriginalReleaseDate
IsDefault="true">2002-01-01</OriginalReleaseDate>
            <ParentalWarningType
IsDefault="true">NotExplicit</ParentalWarningType>
            <IsMultiArtistCompilation>false</IsMultiArtistCompilation>
            <ResourceGroup>
                <ResourceGroup ResourceGroupType="Component">
                    <SequenceNumber>1</SequenceNumber>
                    <ResourceGroupContentItem>
                        <SequenceNumber>1</SequenceNumber>

<ReleaseResourceReference>A1</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>2</SequenceNumber>

<ReleaseResourceReference>A2</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>3</SequenceNumber>

<ReleaseResourceReference>A3</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>4</SequenceNumber>

<ReleaseResourceReference>A4</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>5</SequenceNumber>

<ReleaseResourceReference>A5</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>6</SequenceNumber>

<ReleaseResourceReference>A6</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>7</SequenceNumber>

<ReleaseResourceReference>A7</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>8</SequenceNumber>

<ReleaseResourceReference>A8</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>9</SequenceNumber>

<ReleaseResourceReference>A9</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>10</SequenceNumber>

<ReleaseResourceReference>A10</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>11</SequenceNumber>

<ReleaseResourceReference>A11</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>12</SequenceNumber>

<ReleaseResourceReference>A12</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>13</SequenceNumber>

<ReleaseResourceReference>A13</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                    <ResourceGroupContentItem>
                        <SequenceNumber>14</SequenceNumber>

<ReleaseResourceReference>A14</ReleaseResourceReference>

<IsInstantGratificationResource>false</IsInstantGratificationResource>

<IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource>
                    </ResourceGroupContentItem>
                </ResourceGroup>

<LinkedReleaseResourceReference>A15</LinkedReleaseResourceReference>
            </ResourceGroup>
        </Release>
        <TrackRelease>
            <ReleaseReference>R1</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200733</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200733_R1</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Não Dá Pra Não
Pensar</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Não Dá Pra Não Pensar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Não Dá Pra Não Pensar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A1</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R2</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200734</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200734_R2</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Nada É Por
Acaso</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Nada É Por Acaso</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Nada É Por Acaso</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A2</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R3</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200724</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200724_R3</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Super-Herói (Não É
Fácil)</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Super-Herói (Não É Fácil)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Super-Herói (Não É Fácil)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A3</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R4</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200744</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200744_R4</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Deixa Eu
Tentar</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Deixa Eu Tentar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Deixa Eu Tentar</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A4</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R5</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200735</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200735_R5</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Quando Você Passa (Turu
Turu)</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Quando Você Passa (Turu Turu)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Quando Você Passa (Turu Turu)</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A5</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R6</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200743</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200743_R6</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Uninvited</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Uninvited</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Uninvited</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A6</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R7</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200725</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200725_R7</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Como É Grande O Meu Amor Por
Você</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Como É Grande O Meu Amor Por Você</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Como É Grande O Meu Amor Por Você</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A7</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R8</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200736</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200736_R8</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Enrosca</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Enrosca</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Enrosca</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A8</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R9</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200737</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200737_R9</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">A Lenda</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>A Lenda</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>A Lenda</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A9</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R10</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200738</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200738_R10</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Words Are Not
Enough</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Words Are Not Enough</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Words Are Not Enough</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A10</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R11</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200739</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200739_R11</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Love Never
Fails</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Love Never Fails</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Love Never Fails</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A11</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R12</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200740</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200740_R12</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">O Amor Faz</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>O Amor Faz</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>O Amor Faz</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A12</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R13</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200741</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200741_R13</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">A Gente Dá
Certo</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>A Gente Dá Certo</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>A Gente Dá Certo</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A13</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
        <TrackRelease>
            <ReleaseReference>R14</ReleaseReference>
            <ReleaseId>
                <ISRC>BRMCA0200742</ISRC>
                <ProprietaryId
Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200742_R14</ProprietaryId>
            </ReleaseId>
            <DisplayTitleText IsDefault="true">Cai A Chuva / Me Diz /
Citação: Não Posso Mais</DisplayTitleText>
            <DisplayTitle IsDefault="true">
                <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso
Mais</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </DisplayTitle>
            <AdditionalTitle IsDefault="true" TitleType="FormalTitle">
                <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso
Mais</TitleText>
                <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle>
            </AdditionalTitle>
            <ReleaseResourceReference>A14</ReleaseResourceReference>
            <ReleaseLabelReference
IsDefault="true">P39</ReleaseLabelReference>
            <Genre IsDefault="true">
                <GenreText>Pop</GenreText>
            </Genre>
        </TrackRelease>
    </ReleaseList>
    <DealList>
        <ReleaseDeal>
            <DealReleaseReference>R0</DealReleaseReference>
            <Deal>
                <DealTerms>
                    <TerritoryCode>CA</TerritoryCode>
                    <ValidityPeriod>
                        <StartDate>2007-09-18</StartDate>
                    </ValidityPeriod>

<CommercialModelType>SubscriptionModel</CommercialModelType>
                    <UseType>ConditionalDownload</UseType>

<ReleaseDisplayStartDate>2007-09-18</ReleaseDisplayStartDate>

<TrackListingPreviewStartDate>2007-09-18</TrackListingPreviewStartDate>

<CoverArtPreviewStartDate>2007-09-18</CoverArtPreviewStartDate>
                    <ClipPreviewStartDate>2007-09-18</ClipPreviewStartDate>
                </DealTerms>
            </Deal>
            <Deal>
                <DealTerms>
                    <TerritoryCode>US</TerritoryCode>
                    <ValidityPeriod>
                        <StartDate>2007-11-27</StartDate>
                    </ValidityPeriod>

<CommercialModelType>SubscriptionModel</CommercialModelType>
                    <UseType>ConditionalDownload</UseType>

<ReleaseDisplayStartDate>2007-11-27</ReleaseDisplayStartDate>

<TrackListingPreviewStartDate>2007-11-27</TrackListingPreviewStartDate>

<CoverArtPreviewStartDate>2007-11-27</CoverArtPreviewStartDate>
                    <ClipPreviewStartDate>2007-11-27</ClipPreviewStartDate>
                </DealTerms>
            </Deal>
        </ReleaseDeal>
        <ReleaseDeal>
            <DealReleaseReference>R1</DealReleaseReference>
            <DealReleaseReference>R2</DealReleaseReference>
            <DealReleaseReference>R3</DealReleaseReference>
            <DealReleaseReference>R4</DealReleaseReference>
            <DealReleaseReference>R5</DealReleaseReference>
            <DealReleaseReference>R6</DealReleaseReference>
            <DealReleaseReference>R7</DealReleaseReference>
            <DealReleaseReference>R8</DealReleaseReference>
            <DealReleaseReference>R9</DealReleaseReference>
            <DealReleaseReference>R10</DealReleaseReference>
            <DealReleaseReference>R11</DealReleaseReference>
            <DealReleaseReference>R12</DealReleaseReference>
            <DealReleaseReference>R13</DealReleaseReference>
            <DealReleaseReference>R14</DealReleaseReference>
            <Deal>
                <DealTerms>
                    <TerritoryCode>CA</TerritoryCode>
                    <ValidityPeriod>
                        <StartDate>2007-09-18</StartDate>
                    </ValidityPeriod>

<CommercialModelType>SubscriptionModel</CommercialModelType>
                    <UseType>ConditionalDownload</UseType>
                    <UseType>Stream</UseType>

<ReleaseDisplayStartDate>2007-09-18</ReleaseDisplayStartDate>

<TrackListingPreviewStartDate>2007-09-18</TrackListingPreviewStartDate>

<CoverArtPreviewStartDate>2007-09-18</CoverArtPreviewStartDate>
                    <ClipPreviewStartDate>2007-09-18</ClipPreviewStartDate>
                </DealTerms>
            </Deal>
            <Deal>
                <DealTerms>
                    <TerritoryCode>US</TerritoryCode>
                    <ValidityPeriod>
                        <StartDate>2007-11-27</StartDate>
                    </ValidityPeriod>

<CommercialModelType>SubscriptionModel</CommercialModelType>
                    <UseType>ConditionalDownload</UseType>
                    <UseType>Stream</UseType>

<ReleaseDisplayStartDate>2007-11-27</ReleaseDisplayStartDate>

<TrackListingPreviewStartDate>2007-11-27</TrackListingPreviewStartDate>

<CoverArtPreviewStartDate>2007-11-27</CoverArtPreviewStartDate>
                    <ClipPreviewStartDate>2007-11-27</ClipPreviewStartDate>
                </DealTerms>
            </Deal>
        </ReleaseDeal>
    </DealList>
</ernm:NewReleaseMessage>
Quoted text · Christian Grün · 372 lines
On Fri, Aug 21, 2020 at 2:38 PM Christian Grün <christian.gruen at gmail.com> wrote: > Just a quick hint: As the query info output indicates that no text > index is used (see [1]), you could try to attach explicit text() steps > in your comparisons: > > where $track_release/ReleaseLabelReference/text() = > $r/PartyList/Party/PartyReference/text() > ... > where $track_release/ReleaseResourceReference/text() = > $sound_recording/ResourceReference/text() > ... > > Feel free to provide us with a minimized XML document that allows us > to run your query. > > [1] https://docs.basex.org/wiki/Indexes > > > > On Fri, Aug 21, 2020 at 11:26 PM Bill Osmond <bill at with.in> wrote: > > > > The indentation levels and multiple returns in your suggested query > alone has helped me in understanding what's actually going on, and I've > rewritten the query mostly as you suggest: > > > > for $r in /ernm:NewReleaseMessage > > for $track_release in $r/ReleaseList/TrackRelease > > where $track_release/ReleaseLabelReference = > $r/PartyList/Party/PartyReference > > return > > for $party in $r/PartyList/Party > > for $sound_recording in $r/ResourceList/SoundRecording > > where $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference > > return > > for $release in $r/ReleaseList/Release > > where $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > > return > > <identity> > > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') > }</artist> > > <title>{ $sound_recording/DisplayTitleText/text() }</title> > > <album>{ $release/DisplayTitleText/text() }</album> > > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> > > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> > > </identity> > > > > I say "mostly" because at the first 'where' statement, I had to replace > the $party/PartyReference on the right side of the = with an explicit > reference from $r, because $party isn't defined until 2 lines further down. > The query does work and appears to be giving the right results, however the > performance is basically the same: 127,698.27 ms for this run vs. > 114,935.22 ms for the original. I'll try shuffling things around next! > > > > On Fri, Aug 21, 2020 at 1:52 PM Bill Osmond <bill at with.in> wrote: > >> > >> Thank you both! I was in the middle of typing a response to Bridger > when this came through, so while I digest both of your messages & test > index addition/moving things around, I'll leave the output from the GUI > info panel here - if I knew how to read it, it would no doubt point > straight at the issue! I'll note that it runs much quicker locally as > opposed to on server+via the python BaseXClient, but I don't know if that's > because the GUI is stopping at 500k results, or what. > >> > >> Compiling: > >> - rewrite context value to document-node() sequence: . -> > (db:open-pre("umg-118061851424", 0), ...) > >> - rewrite util:root(nodes) to document-node() sequence: > util:root((db:open-pre("umg-118061851424", 0), ...)) -> > (db:open-pre("umg-118061851424", 0), ...) > >> - move where clause: $track_release_1/ReleaseLabelReference = > $party_2/PartyReference > >> - swap operands: PartyReference = $track_release_1/ReleaseLabelReference > >> - rewrite to predicate: PartyReference = > $track_release_1/ReleaseLabelReference > >> - move where clause: $track_release_1/ReleaseResourceReference = > $sound_recording_3/ResourceReference > >> - swap operands: ResourceReference = > $track_release_1/ReleaseResourceReference > >> - rewrite to predicate: ResourceReference = > $track_release_1/ReleaseResourceReference > >> - swap operands: > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/Rel... > >> - rewrite to predicate: > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/Rel... > >> - inline for $release_4 in > $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/Rele... > >> > >> Optimized Query: > >> for $r_0 in (db:open-pre("umg-118061851424", 0), > ...)/ernm:NewReleaseMessage for $track_release_1 in > $r_0/ReleaseList/TrackRelease for $party_2 in > $r_0/PartyList/Party[PartyReference = > $track_release_1/ReleaseLabelReference] for $sound_recording_3 in > $r_0/ResourceList/SoundRecording[ResourceReference = > $track_release_1/ReleaseResourceReference] return > $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > = $track_release_1/ReleaseResourceReference] ! <identity> <isrc> { > $track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> { > string-join($sound_recording_3/DisplayArtistName, "/") } </artist> <title> > { $sound_recording_3/DisplayTitleText/text() } </title> <album> { > DisplayTitleText/text() } </album> <icpn> { ReleaseId/ICPN/text() } </icpn> > <sublabel> { $party_2/PartyName/FullName/text() } </sublabel> </identity> > >> > >> Query: > >> declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in > /ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease > for $party in $r/PartyList/Party for $sound_recording in > $r/ResourceList/SoundRecording for $release in $r/ReleaseList/Release where > $track_release/ReleaseLabelReference = $party/PartyReference and > $track_release/ReleaseResourceReference = > $sound_recording/ResourceReference and > $track_release/ReleaseResourceReference = > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference > return <identity> <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') > }</artist> <title>{ $sound_recording/DisplayTitleText/text() }</title> > <album>{ $release/DisplayTitleText/text() }</album> <icpn>{ > $release/ReleaseId/ICPN/text() }</icpn> <sublabel>{ > $party/PartyName/FullName/text() }</sublabel> </identity> > >> > >> Result: > >> - Hit(s): 500000 Items > >> - Updated: 0 Items > >> - Printed: 8192 kB > >> - Read Locking: umg-118061851424 > >> - Write Locking: (none) > >> > >> Timing: > >> - Parsing: 2.88 ms > >> - Compiling: 4.38 ms > >> - Evaluating: 114935.22 ms > >> - Printing: 114.59 ms > >> - Total Time: 115057.07 ms > >> > >> Query Plan: > >> <QueryPlan compiled="true" updating="false"> > >> <GFLWOR type="element()*"> > >> <For type="element()" size="1" name="$r" id="0"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <DBNodeSeq type="document-node()+" size="136938" > database="umg-118061851424"> > >> <DBNode pre="0" type="document-node()" size="1" > database="umg-118061851424"/> > >> <DBNode pre="59" type="document-node()" size="1" > database="umg-118061851424"/> > >> <DBNode pre="118" type="document-node()" size="1" > database="umg-118061851424"/> > >> <DBNode pre="177" type="document-node()" size="1" > database="umg-118061851424"/> > >> <DBNode pre="236" type="document-node()" size="1" > database="umg-118061851424"/> > >> </DBNodeSeq> > >> <IterStep axis="child" test="ernm:NewReleaseMessage" > type="element()*"/> > >> </IterPath> > >> </For> > >> <For type="element()" size="1" name="$track_release" id="1"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > >> <IterStep axis="child" test="ReleaseList" type="element()*"/> > >> <IterStep axis="child" test="TrackRelease" type="element()*"/> > >> </IterPath> > >> </For> > >> <For type="element()" size="1" name="$party" id="2"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > >> <IterStep axis="child" test="PartyList" type="element()*"/> > >> <IterStep axis="child" test="Party" type="element()*"> > >> <CmpHashG op="=" type="xs:boolean" size="1"> > >> <SingleIterPath type="element()*" > database="umg-118061851424"> > >> <IterStep axis="child" test="PartyReference" > type="element()*"/> > >> </SingleIterPath> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > >> <IterStep axis="child" test="ReleaseLabelReference" > type="element()*"/> > >> </IterPath> > >> </CmpHashG> > >> </IterStep> > >> </IterPath> > >> </For> > >> <For type="element()" size="1" name="$sound_recording" id="3"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > >> <IterStep axis="child" test="ResourceList" type="element()*"/> > >> <IterStep axis="child" test="SoundRecording" type="element()*"> > >> <CmpHashG op="=" type="xs:boolean" size="1"> > >> <SingleIterPath type="element()*" > database="umg-118061851424"> > >> <IterStep axis="child" test="ResourceReference" > type="element()*"/> > >> </SingleIterPath> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > >> <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > >> </IterPath> > >> </CmpHashG> > >> </IterStep> > >> </IterPath> > >> </For> > >> <DualMap type="element()*"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" database="umg-118061851424" > name="$r" id="0"/> > >> <IterStep axis="child" test="ReleaseList" type="element()*"/> > >> <IterStep axis="child" test="Release" type="element()*"> > >> <CmpHashG op="=" type="xs:boolean" size="1"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <IterStep axis="child" test="ResourceGroup" > type="element()*"/> > >> <IterStep axis="child" test="ResourceGroup" > type="element()*"/> > >> <IterStep axis="child" test="ResourceGroupContentItem" > type="element()*"/> > >> <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > >> </IterPath> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > >> <IterStep axis="child" test="ReleaseResourceReference" > type="element()*"/> > >> </IterPath> > >> </CmpHashG> > >> </IterStep> > >> </IterPath> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">identity</QNm> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">isrc</QNm> > >> <IterPath type="text()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$track_release" id="1"/> > >> <IterStep axis="child" test="ReleaseId" type="element()*"/> > >> <IterStep axis="child" test="ISRC" type="element()*"/> > >> <IterStep axis="child" test="text()" type="text()*"/> > >> </IterPath> > >> </CElem> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">artist</QNm> > >> <FnStringJoin name="string-join" type="xs:string" size="1"> > >> <IterPath type="element()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$sound_recording" id="3"/> > >> <IterStep axis="child" test="DisplayArtistName" > type="element()*"/> > >> </IterPath> > >> <Str type="xs:string" size="1">/</Str> > >> </FnStringJoin> > >> </CElem> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">title</QNm> > >> <IterPath type="text()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$sound_recording" id="3"/> > >> <IterStep axis="child" test="DisplayTitleText" > type="element()*"/> > >> <IterStep axis="child" test="text()" type="text()*"/> > >> </IterPath> > >> </CElem> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">album</QNm> > >> <IterPath type="text()*" database="umg-118061851424"> > >> <IterStep axis="child" test="DisplayTitleText" > type="element()*"/> > >> <IterStep axis="child" test="text()" type="text()*"/> > >> </IterPath> > >> </CElem> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">icpn</QNm> > >> <IterPath type="text()*" database="umg-118061851424"> > >> <IterStep axis="child" test="ReleaseId" type="element()*"/> > >> <IterStep axis="child" test="ICPN" type="element()*"/> > >> <IterStep axis="child" test="text()" type="text()*"/> > >> </IterPath> > >> </CElem> > >> <CElem type="element()" size="1"> > >> <QNm type="xs:QName" size="1">sublabel</QNm> > >> <IterPath type="text()*" database="umg-118061851424"> > >> <VarRef type="element()" size="1" > database="umg-118061851424" name="$party" id="2"/> > >> <IterStep axis="child" test="PartyName" type="element()*"/> > >> <IterStep axis="child" test="FullName" type="element()*"/> > >> <IterStep axis="child" test="text()" type="text()*"/> > >> </IterPath> > >> </CElem> > >> </CElem> > >> </DualMap> > >> </GFLWOR> > >> </QueryPlan> > >> > >> On Fri, Aug 21, 2020 at 1:48 PM Liam R. E. Quin <liam at fromoldbooks.org> > wrote: > >>> > >>> On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: > >>> > > >>> > declare namespace ernm="http://ddex.net/xml/ern/411"; > >>> > > >>> > for $r in /ernm:NewReleaseMessage > >>> > for $track_release in $r/ReleaseList/TrackRelease > >>> > for $party in $r/PartyList/Party > >>> > for $sound_recording in $r/ResourceList/SoundRecording > >>> > for $release in $r/ReleaseList/Release > >>> > where > >>> > $track_release/ReleaseLabelReference = $party/PartyReference > >>> > and $track_release/ReleaseResourceReference = > >>> > $sound_recording/ResourceReference > >>> > and $track_release/ReleaseResourceReference = > >>> > $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release > >>> > ResourceReference > >>> > >>> BaseX is probably smart enough to rewrite this, but check - > >>> > >>> for $r in /ernm:NewReleaseMessage > >>> for $track_release in $r/ReleaseList/TrackRelease > >>> where $track_release/ReleaseLabelReference = $party/PartyReference > >>> > >>> return > >>> for $party in $r/PartyList/Party > >>> for $sound_recording in $r/ResourceList/SoundRecording > >>> where $track_release/ReleaseResourceReference = > >>> $sound_recording/ResourceReference > >>> return > >>> for $release in $r/ReleaseList/Release > >>> where > >>> $track_release/ReleaseResourceReference = > >>> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe > >>> sourceReference > >>> return > >>> <identity>... > >>> > >>> > Am I wrong, and would an additional value index help here? Or is my > >>> > query > >>> > just bad? > >>> > >>> You're computing every possible combiation of 5 items and then > >>> filtering out the ones you want. > >>> > >>> Filtering out earlier would probably help. Also, moving the tests least > >>> lilely to match to the outside would reduce the number of tests sooner. > >>> > >>> A value index might well help, but as Bridger wrote, check in the gUI > >>> to see the query plan. BaseX might already be doing the sort of rewrite > >>> i suggested. > >>> > >>> Liam > >>> > >>> > >>> -- > >>> Liam Quin, https://www.delightfulcomputing.com/ > >>> Available for XML/Document/Information Architecture/XSLT/ > >>> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > >>> Barefoot Web-slave, antique illustrations: > http://www.fromoldbooks.org > >>> > >> > > >
BO
Bill Osmond22 Aug 2020 02:38 #
This shows a significant improvement:
declare namespace ernm="http://ddex.net/xml/ern/411";

for $r in /ernm:NewReleaseMessage
  for $track_release in $r/ReleaseList/TrackRelease
    let $release_label_reference := $track_release/ReleaseLabelReference
    let $release_resource_reference :=
$track_release/ReleaseResourceReference

    let $party := $r/PartyList/Party[PartyReference =
$release_label_reference]
    let $sound_recording :=
$r/ResourceList/SoundRecording[ResourceReference =
$release_resource_reference]
    let $release :=
$r/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
= $release_resource_reference]
    return
      <identity>
        <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
        <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/')
}</artist>
        <title>{ $sound_recording/DisplayTitleText/text() }</title>
        <album>{ $release/DisplayTitleText/text() }</album>
        <icpn>{ $release/ReleaseId/ICPN/text() }</icpn>
        <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
      </identity>
74k ms vs 115k before. Including /text() for the comparisons unfortunately doesn't seem to have much of an effect - 75k ms. I'm not sure why that would be: it is the case that the text being searched for is low cardinality (i.e. every document has a PartyList whose references start at P1 and increment from there), and so the use of the index is perhaps not as effective as it would be if everything was more unique, but the fact that performance numbers are so close (between using /text() and not) I'm wondering if there isn't something else at play. Anyways, this is the info panel data for the above query: Compiling: - rewrite context value to document-node() sequence: . -> (db:open-pre("umg-118061851424", 0), ...) - rewrite util:root(nodes) to document-node() sequence: util:root((db:open-pre("umg-118061851424", 0), ...)) -> (db:open-pre("umg-118061851424", 0), ...) - inline let $party_4 := $r_0/PartyList/Party[PartyReference = $release_label_reference_2] - flatten nested iter path: $r_0/PartyList/Party[PartyReference = $release_label_reference_2] Optimized Query:
for $r_0 in (db:open-pre("umg-118061851424", 0),
...)/ernm:NewReleaseMessage for $track_release_1 in
$r_0/ReleaseList/TrackRelease let $release_label_reference_2 :=
$track_release_1/ReleaseLabelReference let $release_resource_reference_3 :=
$track_release_1/ReleaseResourceReference let $sound_recording_5 :=
$r_0/ResourceList/SoundRecording[ResourceReference =
$release_resource_reference_3] let $release_6 :=
$r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
= $release_resource_reference_3] return <identity> <isrc> {
$track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> {
string-join($sound_recording_5/DisplayArtistName, "/") } </artist> <title>
{ $sound_recording_5/DisplayTitleText/text() } </title> <album> {
$release_6/DisplayTitleText/text() } </album> <icpn> {
$release_6/ReleaseId/ICPN/text() } </icpn> <sublabel> {
$r_0/PartyList/Party[PartyReference =
$release_label_reference_2]/PartyName/FullName/text() } </sublabel>
</identity>
Query:
declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in
/ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease
let $release_label_reference := $track_release/ReleaseLabelReference let
$release_resource_reference := $track_release/ReleaseResourceReference let
$party := $r/PartyList/Party[PartyReference = $release_label_reference] let
$sound_recording := $r/ResourceList/SoundRecording[ResourceReference =
$release_resource_reference] let $release :=
$r/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference
= $release_resource_reference] return <identity> <isrc>{
$track_release/ReleaseId/ISRC/text() }</isrc> <artist>{
fn:string-join($sound_recording/DisplayArtistName, '/') }</artist> <title>{
$sound_recording/DisplayTitleText/text() }</title> <album>{
$release/DisplayTitleText/text() }</album> <icpn>{
$release/ReleaseId/ICPN/text() }</icpn> <sublabel>{
$party/PartyName/FullName/text() }</sublabel> </identity>
Result: - Hit(s): 500000 Items - Updated: 0 Items - Printed: 8192 kB - Read Locking: umg-118061851424 - Write Locking: (none) Timing: - Parsing: 0.88 ms - Compiling: 4.01 ms - Evaluating: 74131.57 ms - Printing: 76.86 ms - Total Time: 74213.32 ms Query Plan:
<QueryPlan compiled="true" updating="false">
  <GFLWOR type="element()*">
    <For type="element()" size="1" name="$r" id="0">
      <IterPath type="element()*" database="umg-118061851424">
        <DBNodeSeq type="document-node()+" size="136938"
database="umg-118061851424">
          <DBNode pre="0" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="59" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="118" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="177" type="document-node()" size="1"
database="umg-118061851424"/>
          <DBNode pre="236" type="document-node()" size="1"
database="umg-118061851424"/>
        </DBNodeSeq>
        <IterStep axis="child" test="ernm:NewReleaseMessage"
type="element()*"/>
      </IterPath>
    </For>
    <For type="element()" size="1" name="$track_release" id="1">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ReleaseList" type="element()*"/>
        <IterStep axis="child" test="TrackRelease" type="element()*"/>
      </IterPath>
    </For>
    <Let type="element()*" name="$release_label_reference" id="2">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
        <IterStep axis="child" test="ReleaseLabelReference"
type="element()*"/>
      </IterPath>
    </Let>
    <Let type="element()*" name="$release_resource_reference" id="3">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
        <IterStep axis="child" test="ReleaseResourceReference"
type="element()*"/>
      </IterPath>
    </Let>
    <Let type="element()*" name="$sound_recording" id="5">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ResourceList" type="element()*"/>
        <IterStep axis="child" test="SoundRecording" type="element()*">
          <CmpHashG op="=" type="xs:boolean" size="1">
            <SingleIterPath type="element()*" database="umg-118061851424">
              <IterStep axis="child" test="ResourceReference"
type="element()*"/>
            </SingleIterPath>
            <VarRef type="element()*" database="umg-118061851424"
name="$release_resource_reference" id="3"/>
          </CmpHashG>
        </IterStep>
      </IterPath>
    </Let>
    <Let type="element()*" name="$release" id="6">
      <IterPath type="element()*" database="umg-118061851424">
        <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
        <IterStep axis="child" test="ReleaseList" type="element()*"/>
        <IterStep axis="child" test="Release" type="element()*">
          <CmpHashG op="=" type="xs:boolean" size="1">
            <IterPath type="element()*" database="umg-118061851424">
              <IterStep axis="child" test="ResourceGroup"
type="element()*"/>
              <IterStep axis="child" test="ResourceGroup"
type="element()*"/>
              <IterStep axis="child" test="ResourceGroupContentItem"
type="element()*"/>
              <IterStep axis="child" test="ReleaseResourceReference"
type="element()*"/>
            </IterPath>
            <VarRef type="element()*" database="umg-118061851424"
name="$release_resource_reference" id="3"/>
          </CmpHashG>
        </IterStep>
      </IterPath>
    </Let>
    <CElem type="element()" size="1">
      <QNm type="xs:QName" size="1">identity</QNm>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">isrc</QNm>
        <IterPath type="text()*" database="umg-118061851424">
          <VarRef type="element()" size="1" database="umg-118061851424"
name="$track_release" id="1"/>
          <IterStep axis="child" test="ReleaseId" type="element()*"/>
          <IterStep axis="child" test="ISRC" type="element()*"/>
          <IterStep axis="child" test="text()" type="text()*"/>
        </IterPath>
      </CElem>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">artist</QNm>
        <FnStringJoin name="string-join" type="xs:string" size="1">
          <CachedPath type="element()*" database="umg-118061851424">
            <VarRef type="element()*" database="umg-118061851424"
name="$sound_recording" id="5"/>
            <IterStep axis="child" test="DisplayArtistName"
type="element()*"/>
          </CachedPath>
          <Str type="xs:string" size="1">/</Str>
        </FnStringJoin>
      </CElem>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">title</QNm>
        <CachedPath type="text()*" database="umg-118061851424">
          <VarRef type="element()*" database="umg-118061851424"
name="$sound_recording" id="5"/>
          <IterStep axis="child" test="DisplayTitleText" type="element()*"/>
          <IterStep axis="child" test="text()" type="text()*"/>
        </CachedPath>
      </CElem>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">album</QNm>
        <CachedPath type="text()*" database="umg-118061851424">
          <VarRef type="element()*" database="umg-118061851424"
name="$release" id="6"/>
          <IterStep axis="child" test="DisplayTitleText" type="element()*"/>
          <IterStep axis="child" test="text()" type="text()*"/>
        </CachedPath>
      </CElem>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">icpn</QNm>
        <CachedPath type="text()*" database="umg-118061851424">
          <VarRef type="element()*" database="umg-118061851424"
name="$release" id="6"/>
          <IterStep axis="child" test="ReleaseId" type="element()*"/>
          <IterStep axis="child" test="ICPN" type="element()*"/>
          <IterStep axis="child" test="text()" type="text()*"/>
        </CachedPath>
      </CElem>
      <CElem type="element()" size="1">
        <QNm type="xs:QName" size="1">sublabel</QNm>
        <IterPath type="text()*" database="umg-118061851424">
          <VarRef type="element()" size="1" database="umg-118061851424"
name="$r" id="0"/>
          <IterStep axis="child" test="PartyList" type="element()*"/>
          <IterStep axis="child" test="Party" type="element()*">
            <CmpHashG op="=" type="xs:boolean" size="1">
              <SingleIterPath type="element()*" database="umg-118061851424">
                <IterStep axis="child" test="PartyReference"
type="element()*"/>
              </SingleIterPath>
              <VarRef type="element()*" database="umg-118061851424"
name="$release_label_reference" id="2"/>
            </CmpHashG>
          </IterStep>
          <IterStep axis="child" test="PartyName" type="element()*"/>
          <IterStep axis="child" test="FullName" type="element()*"/>
          <IterStep axis="child" test="text()" type="text()*"/>
        </IterPath>
      </CElem>
    </CElem>
  </GFLWOR>
</QueryPlan>
Quoted text · Bill Osmond · 2507 lines
On Fri, Aug 21, 2020 at 2:47 PM Bill Osmond <bill at with.in> wrote: > Thank you for the suggestion Christian, and thank you for starting this > project, which saves us from pains that we no doubt would have suffered > were we to use Oracle XML DB! > I'll throw explicit text() steps in, and try to reduce the number of loops > I'm doing. Conceptually there are really only two loops: > > "for each document, iterate over each track, and pull out all of the other > information referenced by that track" > > Below is a single sample document. I wish I could make it smaller, but > such is the problem I'm dealing with :) > > <?xml version="1.0" encoding="UTF-8"?> > <ernm:NewReleaseMessage xmlns:ernm="http://ddex.net/xml/ern/411" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > LanguageAndScriptCode="en" > ReleaseProfileVersionId="Audio" > xsi:schemaLocation="http://ddex.net/xml/ern/411 > http://ddex.net/xml/ern/411/release-notification.xsd"> > <MessageHeader> > <MessageThreadId>xxx</MessageThreadId> > <MessageId>xxx</MessageId> > <MessageSender> > <PartyId>xxx</PartyId> > <PartyName> > <FullName>xxx</FullName> > </PartyName> > </MessageSender> > <MessageRecipient> > <PartyId>xxx</PartyId> > <PartyName> > <FullName>xxx</FullName> > </PartyName> > </MessageRecipient> > <MessageCreatedDateTime>xxx</MessageCreatedDateTime> > <MessageControlType>TestMessage</MessageControlType> > </MessageHeader> > <PartyList> > <Party> > <PartyReference>P1</PartyReference> > <PartyName> > <FullName>Sandy &amp; Junior</FullName> > <KeyName>Sandy &amp; Junior</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P2</PartyReference> > <PartyName> > <FullName>Moogie Canazio</FullName> > <NamesBeforeKeyName>Moogie</NamesBeforeKeyName> > <KeyName>Canazio</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P3</PartyReference> > <PartyName> > <FullName>Sandy</FullName> > <KeyName>Sandy</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P4</PartyReference> > <PartyName> > <FullName>Junior</FullName> > <KeyName>Junior</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P5</PartyReference> > <PartyName> > <FullName>Liah Soares</FullName> > <NamesBeforeKeyName>Liah</NamesBeforeKeyName> > <KeyName>Soares</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P6</PartyReference> > <PartyName> > <FullName>Márcio Cruz</FullName> > <NamesBeforeKeyName>Márcio</NamesBeforeKeyName> > <KeyName>Cruz</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P7</PartyReference> > <PartyName> > <FullName>Pedro Barezzi</FullName> > <NamesBeforeKeyName>Pedro</NamesBeforeKeyName> > <KeyName>Barezzi</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P8</PartyReference> > <PartyName> > <FullName>Danimar</FullName> > <KeyName>Danimar</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P9</PartyReference> > <PartyName> > <FullName>Junior</FullName> > <KeyName>Junior</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P10</PartyReference> > <PartyName> > <FullName>John Ondrasik</FullName> > <NamesBeforeKeyName>John</NamesBeforeKeyName> > <KeyName>Ondrasik</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P11</PartyReference> > <PartyName> > <FullName>Mauricio Gaetani</FullName> > <NamesBeforeKeyName>Mauricio</NamesBeforeKeyName> > <KeyName>Gaetani</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P12</PartyReference> > <PartyName> > <FullName>Otavio De Moraes</FullName> > <NamesBeforeKeyName>Otavio De</NamesBeforeKeyName> > <KeyName>Moraes</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P13</PartyReference> > <PartyName> > <FullName>Francesco Boccia</FullName> > <NamesBeforeKeyName>Francesco</NamesBeforeKeyName> > <KeyName>Boccia</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P14</PartyReference> > <PartyName> > <FullName>Gianfranco Calliendo</FullName> > <NamesBeforeKeyName>Gianfranco</NamesBeforeKeyName> > <KeyName>Calliendo</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P15</PartyReference> > <PartyName> > <FullName>Ciro Esposito</FullName> > <NamesBeforeKeyName>Ciro</NamesBeforeKeyName> > <KeyName>Esposito</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P16</PartyReference> > <PartyName> > <FullName>Ricardo Moreira</FullName> > <NamesBeforeKeyName>Ricardo</NamesBeforeKeyName> > <KeyName>Moreira</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P17</PartyReference> > <PartyName> > <FullName>Alanis Morissette</FullName> > <NamesBeforeKeyName>Alanis</NamesBeforeKeyName> > <KeyName>Morissette</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P18</PartyReference> > <PartyName> > <FullName>Roberto Carlos</FullName> > <NamesBeforeKeyName>Roberto</NamesBeforeKeyName> > <KeyName>Carlos</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P19</PartyReference> > <PartyName> > <FullName>Sandy</FullName> > <KeyName>Sandy</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P20</PartyReference> > <PartyName> > <FullName>Guilherme Lamounier</FullName> > <NamesBeforeKeyName>Guilherme</NamesBeforeKeyName> > <KeyName>Lamounier</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P21</PartyReference> > <PartyName> > <FullName>Nando</FullName> > <KeyName>Nando</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P22</PartyReference> > <PartyName> > <FullName>Kiko</FullName> > <KeyName>Kiko</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P23</PartyReference> > <PartyName> > <FullName>Ricardo Feghali</FullName> > <NamesBeforeKeyName>Ricardo</NamesBeforeKeyName> > <KeyName>Feghali</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P24</PartyReference> > <PartyName> > <FullName>Per Nylen</FullName> > <NamesBeforeKeyName>Per</NamesBeforeKeyName> > <KeyName>Nylen</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P25</PartyReference> > <PartyName> > <FullName>Andreas Carlsson</FullName> > <NamesBeforeKeyName>Andreas</NamesBeforeKeyName> > <KeyName>Carlsson</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P26</PartyReference> > <PartyName> > <FullName>Julie Morrison</FullName> > <NamesBeforeKeyName>Julie</NamesBeforeKeyName> > <KeyName>Morrison</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P27</PartyReference> > <PartyName> > <FullName>Jane Vaughn</FullName> > <KeyName>Jane Vaughn</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P28</PartyReference> > <PartyName> > <FullName>Karsten Dahlgaard</FullName> > <NamesBeforeKeyName>Karsten</NamesBeforeKeyName> > <KeyName>Dahlgaard</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P29</PartyReference> > <PartyName> > <FullName>Johnny Pedersen</FullName> > <NamesBeforeKeyName>Johnny</NamesBeforeKeyName> > <KeyName>Pedersen</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P30</PartyReference> > <PartyName> > <FullName>Milton Guedes</FullName> > <NamesBeforeKeyName>Milton</NamesBeforeKeyName> > <KeyName>Guedes</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P31</PartyReference> > <PartyName> > <FullName>Paulinho Galvão</FullName> > <NamesBeforeKeyName>Paulinho</NamesBeforeKeyName> > <KeyName>Galvão</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P32</PartyReference> > <PartyName> > <FullName>Lloyd &quot;Gitsy&quot; Oliver Willis</FullName> > <NamesBeforeKeyName>Lloyd &quot;Gitsy&quot; > Oliver</NamesBeforeKeyName> > <KeyName>Willis</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P33</PartyReference> > <PartyName> > <FullName>Robbie Shakespeare</FullName> > <NamesBeforeKeyName>Robbie</NamesBeforeKeyName> > <KeyName>Shakespeare</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P34</PartyReference> > <PartyName> > <FullName>Everton Bonner</FullName> > <NamesBeforeKeyName>Everton</NamesBeforeKeyName> > <KeyName>Bonner</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P35</PartyReference> > <PartyName> > <FullName>Joseph Bonner</FullName> > <NamesBeforeKeyName>Joseph</NamesBeforeKeyName> > <KeyName>Bonner</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P36</PartyReference> > <PartyName> > <FullName>John Taylor</FullName> > <NamesBeforeKeyName>John</NamesBeforeKeyName> > <KeyName>Taylor</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P37</PartyReference> > <PartyName> > <FullName>Sly Dunbar</FullName> > <NamesBeforeKeyName>Sly</NamesBeforeKeyName> > <KeyName>Dunbar</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P38</PartyReference> > <PartyName> > <FullName>Pedro Abrunhosa</FullName> > <NamesBeforeKeyName>Pedro</NamesBeforeKeyName> > <KeyName>Abrunhosa</KeyName> > </PartyName> > </Party> > <Party> > <PartyReference>P39</PartyReference> > <PartyName> > <FullName>Universal Music International Ltda.</FullName> > </PartyName> > </Party> > </PartyList> > <ResourceList> > <SoundRecording> > <ResourceReference>A1</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200733</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Não Dá Pra Não > Pensar</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Não Dá Pra Não Pensar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Não Dá Pra Não Pensar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M50S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T15</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M50.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T15_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>D0DA7A0C4FBB86CFF71FE185E7D04EDB</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A2</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200734</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Nada É Por > Acaso</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Nada É Por Acaso</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Nada É Por Acaso</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P5</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P6</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="6"> > <ContributorPartyReference>P7</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="7"> > <ContributorPartyReference>P8</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M21S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T14</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M21.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T14_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>0D7EE7708A5CE62C75CBB9B5754C1B4D</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A3</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200724</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Super-Herói (Não É > Fácil)</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Super-Herói (Não É Fácil)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Super-Herói (Não É Fácil)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P9</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P10</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P11</ContributorPartyReference> > <Role>Translator</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M14S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T13</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M13.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T13_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>E3EAC70ED4B59307191AE87D80084548</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A4</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200744</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Deixa Eu > Tentar</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Deixa Eu Tentar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Deixa Eu Tentar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P12</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M53S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T12</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M53.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T12_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>764951DA059C70123A726D329FF5462A</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A5</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200735</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Quando Você Passa (Turu > Turu)</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Quando Você Passa (Turu Turu)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Quando Você Passa (Turu Turu)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P13</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P14</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="6"> > <ContributorPartyReference>P15</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="7"> > <ContributorPartyReference>P16</ContributorPartyReference> > <Role>Translator</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT3M52S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T11</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H3M51.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T11_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>C037C6F6579786DA17817D2CA43975E5</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A6</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200743</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Uninvited</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Uninvited</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Uninvited</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P17</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M47S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>en</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T10</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M46.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T10_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>D6B0CC56A1FE3B1953C78786D933058B</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A7</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200725</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Como É Grande O Meu Amor > Por Você</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Como É Grande O Meu Amor Por Você</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Como É Grande O Meu Amor Por Você</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P18</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT2M50S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T9</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H2M49.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T9_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>7E752408F66B43CBE9EBA14B59A52BF8</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A8</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200736</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Enrosca</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Enrosca</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Enrosca</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P19</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P20</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT3M32S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T8</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H3M31.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T8_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>C0657E94D28F126B6A8796425B2CFC5B</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A9</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200737</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">A Lenda</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>A Lenda</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>A Lenda</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P21</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P22</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="6"> > <ContributorPartyReference>P23</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M38S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T7</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M37.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T7_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>BE335EAE070F07470B785ABA05451BE6</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A10</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200738</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Words Are Not > Enough</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Words Are Not Enough</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Words Are Not Enough</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P24</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P25</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT3M34S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>en</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T6</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H3M34.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T6_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>4EDBF599C3C2876D83B0AF877AF7577D</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A11</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200739</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Love Never > Fails</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Love Never Fails</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Love Never Fails</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P26</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P27</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="6"> > <ContributorPartyReference>P28</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="7"> > <ContributorPartyReference>P29</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M10S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>en</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T5</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M10.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T5_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>23A44A17289D6CC6796998DE5081E465</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A12</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200740</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">O Amor > Faz</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>O Amor Faz</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>O Amor Faz</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P11</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M36S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T4</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M35.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T4_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>DFF2D6AEC7D87F8D4D317B1372D4CC97</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A13</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200741</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">A Gente Dá > Certo</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>A Gente Dá Certo</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>A Gente Dá Certo</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P30</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT4M17S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T3</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H4M17.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T3_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>C83A3CE4AAD1F3E4407E6CEA7C892B12</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <SoundRecording> > <ResourceReference>A14</ResourceReference> > <Type>MusicalWorkSoundRecording</Type> > <ResourceId> > <ISRC>BRMCA0200742</ISRC> > </ResourceId> > <DisplayTitleText IsDefault="true">Cai A Chuva / Me Diz / > Citação: Não Posso Mais</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso > Mais</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso > Mais</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P2</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Producer">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="2"> > <ContributorPartyReference>P3</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="3"> > <ContributorPartyReference>P4</ContributorPartyReference> > <Role>AssociatedPerformer</Role> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="Vocalist">UserDefined</Role> > </Contributor> > <Contributor SequenceNumber="4"> > <ContributorPartyReference>P30</ContributorPartyReference> > <Role>ComposerLyricist</Role> > <Role>Translator</Role> > </Contributor> > <Contributor SequenceNumber="5"> > <ContributorPartyReference>P31</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="6"> > <ContributorPartyReference>P32</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="7"> > <ContributorPartyReference>P33</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="8"> > <ContributorPartyReference>P34</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="9"> > <ContributorPartyReference>P35</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="10"> > <ContributorPartyReference>P36</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="11"> > <ContributorPartyReference>P37</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <Contributor SequenceNumber="12"> > <ContributorPartyReference>P38</ContributorPartyReference> > <Role>ComposerLyricist</Role> > </Contributor> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music International</PLineCompany> > <PLineText>℗ 2002 Universal Music International</PLineText> > </PLine> > <Duration>PT5M14S</Duration> > <CreationDate ApplicableTerritoryCode="BR" > LocationDescription="Maracanã, Rio de Janeiro (RJ)">2002-10-12 > </CreationDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <LanguageOfPerformance>pt</LanguageOfPerformance> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T2</TechnicalResourceDetailsReference> > <AudioCodecType>FLAC</AudioCodecType> > <NumberOfChannels>2</NumberOfChannels> > <SamplingRate UnitOfMeasure="kHz">44.1</SamplingRate> > <BitsPerSample>16</BitsPerSample> > <Duration>PT0H5M13.000S</Duration> > <IsPreview>false</IsPreview> > <File> > <URI>00044006704722_T2_audtrk.flac</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>5DC6BD4B66CE9AC8376210A3D497605A</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </SoundRecording> > <Image> > <ResourceReference>A15</ResourceReference> > <Type>FrontCoverImage</Type> > <ResourceId> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">06UMGIM33173</ProprietaryId> > </ResourceId> > <DisplayTitleText IsDefault="true">Sandy &amp; Júnior Ao Vivo > No Maracanã</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Sandy &amp; Júnior Ao Vivo No > Maracanã</TitleText> > <SubTitle>Ao Vivo</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Sandy &amp; Júnior Ao Vivo No > Maracanã</TitleText> > <SubTitle>Ao Vivo</SubTitle> > </AdditionalTitle> > <Contributor SequenceNumber="1"> > <ContributorPartyReference>P1</ContributorPartyReference> > <Role Namespace="DPID:PADPIDA2013042401U" > UserDefinedValue="MainArtist">UserDefined</Role> > </Contributor> > <CLine IsDefault="true"> > <Year>2002</Year> > <CLineCompany>Universal Music International</CLineCompany> > <CLineText>© 2002 Universal Music International</CLineText> > </CLine> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <TechnicalDetails> > > <TechnicalResourceDetailsReference>T1</TechnicalResourceDetailsReference> > <ImageCodecType>JPEG</ImageCodecType> > <ImageHeight UnitOfMeasure="Pixel">1408</ImageHeight> > <ImageWidth UnitOfMeasure="Pixel">1422</ImageWidth> > <File> > <URI>06UMGIM33173_T1_cvrart.jpg</URI> > <HashSum> > <Algorithm>MD5</Algorithm> > > <HashSumValue>f6b0cdeaff97c8c438f940a12f3060c3</HashSumValue> > </HashSum> > </File> > </TechnicalDetails> > </Image> > </ResourceList> > <ReleaseList> > <Release> > <ReleaseReference>R0</ReleaseReference> > <ReleaseType>Album</ReleaseType> > <ReleaseId> > <ICPN>00044006704722</ICPN> > </ReleaseId> > <DisplayTitleText IsDefault="true">Ao Vivo No > Maracanã</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Ao Vivo No Maracanã</TitleText> > <SubTitle>Ao Vivo</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Ao Vivo No Maracanã</TitleText> > <SubTitle>Ao Vivo</SubTitle> > </AdditionalTitle> > <DisplayArtistName IsDefault="true">Sandy &amp; > Junior</DisplayArtistName> > <DisplayArtist SequenceNumber="1"> > <ArtistPartyReference>P1</ArtistPartyReference> > <DisplayArtistRole>MainArtist</DisplayArtistRole> > </DisplayArtist> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <PLine IsDefault="true"> > <Year>2002</Year> > <PLineCompany>Universal Music Ltda</PLineCompany> > <PLineText>℗ 2002 Universal Music Ltda</PLineText> > </PLine> > <CLine IsDefault="true"> > <Year>2002</Year> > <CLineCompany>Universal Music Ltda</CLineCompany> > <CLineText>© 2002 Universal Music Ltda</CLineText> > </CLine> > <Duration>PT59M47S</Duration> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > <ReleaseDate IsDefault="true">2006-03-07</ReleaseDate> > <OriginalReleaseDate > IsDefault="true">2002-01-01</OriginalReleaseDate> > <ParentalWarningType > IsDefault="true">NotExplicit</ParentalWarningType> > <IsMultiArtistCompilation>false</IsMultiArtistCompilation> > <ResourceGroup> > <ResourceGroup ResourceGroupType="Component"> > <SequenceNumber>1</SequenceNumber> > <ResourceGroupContentItem> > <SequenceNumber>1</SequenceNumber> > > <ReleaseResourceReference>A1</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>2</SequenceNumber> > > <ReleaseResourceReference>A2</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>3</SequenceNumber> > > <ReleaseResourceReference>A3</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>4</SequenceNumber> > > <ReleaseResourceReference>A4</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>5</SequenceNumber> > > <ReleaseResourceReference>A5</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>6</SequenceNumber> > > <ReleaseResourceReference>A6</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>7</SequenceNumber> > > <ReleaseResourceReference>A7</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>8</SequenceNumber> > > <ReleaseResourceReference>A8</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>9</SequenceNumber> > > <ReleaseResourceReference>A9</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>10</SequenceNumber> > > <ReleaseResourceReference>A10</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>11</SequenceNumber> > > <ReleaseResourceReference>A11</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>12</SequenceNumber> > > <ReleaseResourceReference>A12</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>13</SequenceNumber> > > <ReleaseResourceReference>A13</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > <ResourceGroupContentItem> > <SequenceNumber>14</SequenceNumber> > > <ReleaseResourceReference>A14</ReleaseResourceReference> > > <IsInstantGratificationResource>false</IsInstantGratificationResource> > > <IsPreOrderIncentiveResource>false</IsPreOrderIncentiveResource> > </ResourceGroupContentItem> > </ResourceGroup> > > <LinkedReleaseResourceReference>A15</LinkedReleaseResourceReference> > </ResourceGroup> > </Release> > <TrackRelease> > <ReleaseReference>R1</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200733</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200733_R1</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Não Dá Pra Não > Pensar</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Não Dá Pra Não Pensar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Não Dá Pra Não Pensar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A1</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R2</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200734</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200734_R2</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Nada É Por > Acaso</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Nada É Por Acaso</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Nada É Por Acaso</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A2</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R3</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200724</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200724_R3</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Super-Herói (Não É > Fácil)</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Super-Herói (Não É Fácil)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Super-Herói (Não É Fácil)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A3</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R4</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200744</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200744_R4</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Deixa Eu > Tentar</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Deixa Eu Tentar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Deixa Eu Tentar</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A4</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R5</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200735</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200735_R5</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Quando Você Passa (Turu > Turu)</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Quando Você Passa (Turu Turu)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Quando Você Passa (Turu Turu)</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A5</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R6</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200743</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200743_R6</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Uninvited</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Uninvited</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Uninvited</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A6</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R7</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200725</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200725_R7</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Como É Grande O Meu Amor > Por Você</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Como É Grande O Meu Amor Por Você</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Como É Grande O Meu Amor Por Você</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A7</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R8</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200736</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200736_R8</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Enrosca</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Enrosca</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Enrosca</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A8</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R9</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200737</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200737_R9</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">A Lenda</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>A Lenda</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>A Lenda</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A9</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R10</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200738</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200738_R10</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Words Are Not > Enough</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Words Are Not Enough</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Words Are Not Enough</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A10</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R11</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200739</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200739_R11</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Love Never > Fails</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Love Never Fails</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Love Never Fails</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A11</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R12</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200740</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200740_R12</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">O Amor > Faz</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>O Amor Faz</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>O Amor Faz</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A12</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R13</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200741</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200741_R13</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">A Gente Dá > Certo</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>A Gente Dá Certo</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>A Gente Dá Certo</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A13</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > <TrackRelease> > <ReleaseReference>R14</ReleaseReference> > <ReleaseId> > <ISRC>BRMCA0200742</ISRC> > <ProprietaryId > Namespace="DPID:PADPIDA2013042401U">00044006704722_BRMCA0200742_R14</ProprietaryId> > </ReleaseId> > <DisplayTitleText IsDefault="true">Cai A Chuva / Me Diz / > Citação: Não Posso Mais</DisplayTitleText> > <DisplayTitle IsDefault="true"> > <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso > Mais</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </DisplayTitle> > <AdditionalTitle IsDefault="true" TitleType="FormalTitle"> > <TitleText>Cai A Chuva / Me Diz / Citação: Não Posso > Mais</TitleText> > <SubTitle>Ao Vivo No Rio De Janeiro / 2002</SubTitle> > </AdditionalTitle> > <ReleaseResourceReference>A14</ReleaseResourceReference> > <ReleaseLabelReference > IsDefault="true">P39</ReleaseLabelReference> > <Genre IsDefault="true"> > <GenreText>Pop</GenreText> > </Genre> > </TrackRelease> > </ReleaseList> > <DealList> > <ReleaseDeal> > <DealReleaseReference>R0</DealReleaseReference> > <Deal> > <DealTerms> > <TerritoryCode>CA</TerritoryCode> > <ValidityPeriod> > <StartDate>2007-09-18</StartDate> > </ValidityPeriod> > > <CommercialModelType>SubscriptionModel</CommercialModelType> > <UseType>ConditionalDownload</UseType> > > <ReleaseDisplayStartDate>2007-09-18</ReleaseDisplayStartDate> > > <TrackListingPreviewStartDate>2007-09-18</TrackListingPreviewStartDate> > > <CoverArtPreviewStartDate>2007-09-18</CoverArtPreviewStartDate> > <ClipPreviewStartDate>2007-09-18</ClipPreviewStartDate> > </DealTerms> > </Deal> > <Deal> > <DealTerms> > <TerritoryCode>US</TerritoryCode> > <ValidityPeriod> > <StartDate>2007-11-27</StartDate> > </ValidityPeriod> > > <CommercialModelType>SubscriptionModel</CommercialModelType> > <UseType>ConditionalDownload</UseType> > > <ReleaseDisplayStartDate>2007-11-27</ReleaseDisplayStartDate> > > <TrackListingPreviewStartDate>2007-11-27</TrackListingPreviewStartDate> > > <CoverArtPreviewStartDate>2007-11-27</CoverArtPreviewStartDate> > <ClipPreviewStartDate>2007-11-27</ClipPreviewStartDate> > </DealTerms> > </Deal> > </ReleaseDeal> > <ReleaseDeal> > <DealReleaseReference>R1</DealReleaseReference> > <DealReleaseReference>R2</DealReleaseReference> > <DealReleaseReference>R3</DealReleaseReference> > <DealReleaseReference>R4</DealReleaseReference> > <DealReleaseReference>R5</DealReleaseReference> > <DealReleaseReference>R6</DealReleaseReference> > <DealReleaseReference>R7</DealReleaseReference> > <DealReleaseReference>R8</DealReleaseReference> > <DealReleaseReference>R9</DealReleaseReference> > <DealReleaseReference>R10</DealReleaseReference> > <DealReleaseReference>R11</DealReleaseReference> > <DealReleaseReference>R12</DealReleaseReference> > <DealReleaseReference>R13</DealReleaseReference> > <DealReleaseReference>R14</DealReleaseReference> > <Deal> > <DealTerms> > <TerritoryCode>CA</TerritoryCode> > <ValidityPeriod> > <StartDate>2007-09-18</StartDate> > </ValidityPeriod> > > <CommercialModelType>SubscriptionModel</CommercialModelType> > <UseType>ConditionalDownload</UseType> > <UseType>Stream</UseType> > > <ReleaseDisplayStartDate>2007-09-18</ReleaseDisplayStartDate> > > <TrackListingPreviewStartDate>2007-09-18</TrackListingPreviewStartDate> > > <CoverArtPreviewStartDate>2007-09-18</CoverArtPreviewStartDate> > <ClipPreviewStartDate>2007-09-18</ClipPreviewStartDate> > </DealTerms> > </Deal> > <Deal> > <DealTerms> > <TerritoryCode>US</TerritoryCode> > <ValidityPeriod> > <StartDate>2007-11-27</StartDate> > </ValidityPeriod> > > <CommercialModelType>SubscriptionModel</CommercialModelType> > <UseType>ConditionalDownload</UseType> > <UseType>Stream</UseType> > > <ReleaseDisplayStartDate>2007-11-27</ReleaseDisplayStartDate> > > <TrackListingPreviewStartDate>2007-11-27</TrackListingPreviewStartDate> > > <CoverArtPreviewStartDate>2007-11-27</CoverArtPreviewStartDate> > <ClipPreviewStartDate>2007-11-27</ClipPreviewStartDate> > </DealTerms> > </Deal> > </ReleaseDeal> > </DealList> > </ernm:NewReleaseMessage> > > > > > > > On Fri, Aug 21, 2020 at 2:38 PM Christian Grün <christian.gruen at gmail.com> > wrote: > >> Just a quick hint: As the query info output indicates that no text >> index is used (see [1]), you could try to attach explicit text() steps >> in your comparisons: >> >> where $track_release/ReleaseLabelReference/text() = >> $r/PartyList/Party/PartyReference/text() >> ... >> where $track_release/ReleaseResourceReference/text() = >> $sound_recording/ResourceReference/text() >> ... >> >> Feel free to provide us with a minimized XML document that allows us >> to run your query. >> >> [1] https://docs.basex.org/wiki/Indexes >> >> >> >> On Fri, Aug 21, 2020 at 11:26 PM Bill Osmond <bill at with.in> wrote: >> > >> > The indentation levels and multiple returns in your suggested query >> alone has helped me in understanding what's actually going on, and I've >> rewritten the query mostly as you suggest: >> > >> > for $r in /ernm:NewReleaseMessage >> > for $track_release in $r/ReleaseList/TrackRelease >> > where $track_release/ReleaseLabelReference = >> $r/PartyList/Party/PartyReference >> > return >> > for $party in $r/PartyList/Party >> > for $sound_recording in $r/ResourceList/SoundRecording >> > where $track_release/ReleaseResourceReference = >> $sound_recording/ResourceReference >> > return >> > for $release in $r/ReleaseList/Release >> > where $track_release/ReleaseResourceReference = >> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference >> > return >> > <identity> >> > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> >> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') >> }</artist> >> > <title>{ $sound_recording/DisplayTitleText/text() }</title> >> > <album>{ $release/DisplayTitleText/text() }</album> >> > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> >> > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> >> > </identity> >> > >> > I say "mostly" because at the first 'where' statement, I had to replace >> the $party/PartyReference on the right side of the = with an explicit >> reference from $r, because $party isn't defined until 2 lines further down. >> The query does work and appears to be giving the right results, however the >> performance is basically the same: 127,698.27 ms for this run vs. >> 114,935.22 ms for the original. I'll try shuffling things around next! >> > >> > On Fri, Aug 21, 2020 at 1:52 PM Bill Osmond <bill at with.in> wrote: >> >> >> >> Thank you both! I was in the middle of typing a response to Bridger >> when this came through, so while I digest both of your messages & test >> index addition/moving things around, I'll leave the output from the GUI >> info panel here - if I knew how to read it, it would no doubt point >> straight at the issue! I'll note that it runs much quicker locally as >> opposed to on server+via the python BaseXClient, but I don't know if that's >> because the GUI is stopping at 500k results, or what. >> >> >> >> Compiling: >> >> - rewrite context value to document-node() sequence: . -> >> (db:open-pre("umg-118061851424", 0), ...) >> >> - rewrite util:root(nodes) to document-node() sequence: >> util:root((db:open-pre("umg-118061851424", 0), ...)) -> >> (db:open-pre("umg-118061851424", 0), ...) >> >> - move where clause: $track_release_1/ReleaseLabelReference = >> $party_2/PartyReference >> >> - swap operands: PartyReference = >> $track_release_1/ReleaseLabelReference >> >> - rewrite to predicate: PartyReference = >> $track_release_1/ReleaseLabelReference >> >> - move where clause: $track_release_1/ReleaseResourceReference = >> $sound_recording_3/ResourceReference >> >> - swap operands: ResourceReference = >> $track_release_1/ReleaseResourceReference >> >> - rewrite to predicate: ResourceReference = >> $track_release_1/ReleaseResourceReference >> >> - swap operands: >> ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference >> = $track_release_1/Rel... >> >> - rewrite to predicate: >> ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference >> = $track_release_1/Rel... >> >> - inline for $release_4 in >> $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/Rele... >> >> >> >> Optimized Query: >> >> for $r_0 in (db:open-pre("umg-118061851424", 0), >> ...)/ernm:NewReleaseMessage for $track_release_1 in >> $r_0/ReleaseList/TrackRelease for $party_2 in >> $r_0/PartyList/Party[PartyReference = >> $track_release_1/ReleaseLabelReference] for $sound_recording_3 in >> $r_0/ResourceList/SoundRecording[ResourceReference = >> $track_release_1/ReleaseResourceReference] return >> $r_0/ReleaseList/Release[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference >> = $track_release_1/ReleaseResourceReference] ! <identity> <isrc> { >> $track_release_1/ReleaseId/ISRC/text() } </isrc> <artist> { >> string-join($sound_recording_3/DisplayArtistName, "/") } </artist> <title> >> { $sound_recording_3/DisplayTitleText/text() } </title> <album> { >> DisplayTitleText/text() } </album> <icpn> { ReleaseId/ICPN/text() } </icpn> >> <sublabel> { $party_2/PartyName/FullName/text() } </sublabel> </identity> >> >> >> >> Query: >> >> declare namespace ernm="http://ddex.net/xml/ern/411"; for $r in >> /ernm:NewReleaseMessage for $track_release in $r/ReleaseList/TrackRelease >> for $party in $r/PartyList/Party for $sound_recording in >> $r/ResourceList/SoundRecording for $release in $r/ReleaseList/Release where >> $track_release/ReleaseLabelReference = $party/PartyReference and >> $track_release/ReleaseResourceReference = >> $sound_recording/ResourceReference and >> $track_release/ReleaseResourceReference = >> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference >> return <identity> <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> >> <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') >> }</artist> <title>{ $sound_recording/DisplayTitleText/text() }</title> >> <album>{ $release/DisplayTitleText/text() }</album> <icpn>{ >> $release/ReleaseId/ICPN/text() }</icpn> <sublabel>{ >> $party/PartyName/FullName/text() }</sublabel> </identity> >> >> >> >> Result: >> >> - Hit(s): 500000 Items >> >> - Updated: 0 Items >> >> - Printed: 8192 kB >> >> - Read Locking: umg-118061851424 >> >> - Write Locking: (none) >> >> >> >> Timing: >> >> - Parsing: 2.88 ms >> >> - Compiling: 4.38 ms >> >> - Evaluating: 114935.22 ms >> >> - Printing: 114.59 ms >> >> - Total Time: 115057.07 ms >> >> >> >> Query Plan: >> >> <QueryPlan compiled="true" updating="false"> >> >> <GFLWOR type="element()*"> >> >> <For type="element()" size="1" name="$r" id="0"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <DBNodeSeq type="document-node()+" size="136938" >> database="umg-118061851424"> >> >> <DBNode pre="0" type="document-node()" size="1" >> database="umg-118061851424"/> >> >> <DBNode pre="59" type="document-node()" size="1" >> database="umg-118061851424"/> >> >> <DBNode pre="118" type="document-node()" size="1" >> database="umg-118061851424"/> >> >> <DBNode pre="177" type="document-node()" size="1" >> database="umg-118061851424"/> >> >> <DBNode pre="236" type="document-node()" size="1" >> database="umg-118061851424"/> >> >> </DBNodeSeq> >> >> <IterStep axis="child" test="ernm:NewReleaseMessage" >> type="element()*"/> >> >> </IterPath> >> >> </For> >> >> <For type="element()" size="1" name="$track_release" id="1"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" database="umg-118061851424" >> name="$r" id="0"/> >> >> <IterStep axis="child" test="ReleaseList" type="element()*"/> >> >> <IterStep axis="child" test="TrackRelease" type="element()*"/> >> >> </IterPath> >> >> </For> >> >> <For type="element()" size="1" name="$party" id="2"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" database="umg-118061851424" >> name="$r" id="0"/> >> >> <IterStep axis="child" test="PartyList" type="element()*"/> >> >> <IterStep axis="child" test="Party" type="element()*"> >> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> >> <SingleIterPath type="element()*" >> database="umg-118061851424"> >> >> <IterStep axis="child" test="PartyReference" >> type="element()*"/> >> >> </SingleIterPath> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$track_release" id="1"/> >> >> <IterStep axis="child" test="ReleaseLabelReference" >> type="element()*"/> >> >> </IterPath> >> >> </CmpHashG> >> >> </IterStep> >> >> </IterPath> >> >> </For> >> >> <For type="element()" size="1" name="$sound_recording" id="3"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" database="umg-118061851424" >> name="$r" id="0"/> >> >> <IterStep axis="child" test="ResourceList" type="element()*"/> >> >> <IterStep axis="child" test="SoundRecording" type="element()*"> >> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> >> <SingleIterPath type="element()*" >> database="umg-118061851424"> >> >> <IterStep axis="child" test="ResourceReference" >> type="element()*"/> >> >> </SingleIterPath> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$track_release" id="1"/> >> >> <IterStep axis="child" test="ReleaseResourceReference" >> type="element()*"/> >> >> </IterPath> >> >> </CmpHashG> >> >> </IterStep> >> >> </IterPath> >> >> </For> >> >> <DualMap type="element()*"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" database="umg-118061851424" >> name="$r" id="0"/> >> >> <IterStep axis="child" test="ReleaseList" type="element()*"/> >> >> <IterStep axis="child" test="Release" type="element()*"> >> >> <CmpHashG op="=" type="xs:boolean" size="1"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <IterStep axis="child" test="ResourceGroup" >> type="element()*"/> >> >> <IterStep axis="child" test="ResourceGroup" >> type="element()*"/> >> >> <IterStep axis="child" test="ResourceGroupContentItem" >> type="element()*"/> >> >> <IterStep axis="child" test="ReleaseResourceReference" >> type="element()*"/> >> >> </IterPath> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$track_release" id="1"/> >> >> <IterStep axis="child" test="ReleaseResourceReference" >> type="element()*"/> >> >> </IterPath> >> >> </CmpHashG> >> >> </IterStep> >> >> </IterPath> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">identity</QNm> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">isrc</QNm> >> >> <IterPath type="text()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$track_release" id="1"/> >> >> <IterStep axis="child" test="ReleaseId" type="element()*"/> >> >> <IterStep axis="child" test="ISRC" type="element()*"/> >> >> <IterStep axis="child" test="text()" type="text()*"/> >> >> </IterPath> >> >> </CElem> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">artist</QNm> >> >> <FnStringJoin name="string-join" type="xs:string" size="1"> >> >> <IterPath type="element()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$sound_recording" id="3"/> >> >> <IterStep axis="child" test="DisplayArtistName" >> type="element()*"/> >> >> </IterPath> >> >> <Str type="xs:string" size="1">/</Str> >> >> </FnStringJoin> >> >> </CElem> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">title</QNm> >> >> <IterPath type="text()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$sound_recording" id="3"/> >> >> <IterStep axis="child" test="DisplayTitleText" >> type="element()*"/> >> >> <IterStep axis="child" test="text()" type="text()*"/> >> >> </IterPath> >> >> </CElem> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">album</QNm> >> >> <IterPath type="text()*" database="umg-118061851424"> >> >> <IterStep axis="child" test="DisplayTitleText" >> type="element()*"/> >> >> <IterStep axis="child" test="text()" type="text()*"/> >> >> </IterPath> >> >> </CElem> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">icpn</QNm> >> >> <IterPath type="text()*" database="umg-118061851424"> >> >> <IterStep axis="child" test="ReleaseId" type="element()*"/> >> >> <IterStep axis="child" test="ICPN" type="element()*"/> >> >> <IterStep axis="child" test="text()" type="text()*"/> >> >> </IterPath> >> >> </CElem> >> >> <CElem type="element()" size="1"> >> >> <QNm type="xs:QName" size="1">sublabel</QNm> >> >> <IterPath type="text()*" database="umg-118061851424"> >> >> <VarRef type="element()" size="1" >> database="umg-118061851424" name="$party" id="2"/> >> >> <IterStep axis="child" test="PartyName" type="element()*"/> >> >> <IterStep axis="child" test="FullName" type="element()*"/> >> >> <IterStep axis="child" test="text()" type="text()*"/> >> >> </IterPath> >> >> </CElem> >> >> </CElem> >> >> </DualMap> >> >> </GFLWOR> >> >> </QueryPlan> >> >> >> >> On Fri, Aug 21, 2020 at 1:48 PM Liam R. E. Quin <liam at fromoldbooks.org> >> wrote: >> >>> >> >>> On Fri, 2020-08-21 at 12:51 -0700, Bill Osmond wrote: >> >>> > >> >>> > declare namespace ernm="http://ddex.net/xml/ern/411"; >> >>> > >> >>> > for $r in /ernm:NewReleaseMessage >> >>> > for $track_release in $r/ReleaseList/TrackRelease >> >>> > for $party in $r/PartyList/Party >> >>> > for $sound_recording in $r/ResourceList/SoundRecording >> >>> > for $release in $r/ReleaseList/Release >> >>> > where >> >>> > $track_release/ReleaseLabelReference = $party/PartyReference >> >>> > and $track_release/ReleaseResourceReference = >> >>> > $sound_recording/ResourceReference >> >>> > and $track_release/ReleaseResourceReference = >> >>> > >> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/Release >> >>> > ResourceReference >> >>> >> >>> BaseX is probably smart enough to rewrite this, but check - >> >>> >> >>> for $r in /ernm:NewReleaseMessage >> >>> for $track_release in $r/ReleaseList/TrackRelease >> >>> where $track_release/ReleaseLabelReference = $party/PartyReference >> >>> >> >>> return >> >>> for $party in $r/PartyList/Party >> >>> for $sound_recording in $r/ResourceList/SoundRecording >> >>> where $track_release/ReleaseResourceReference = >> >>> $sound_recording/ResourceReference >> >>> return >> >>> for $release in $r/ReleaseList/Release >> >>> where >> >>> $track_release/ReleaseResourceReference = >> >>> >> $release/ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseRe >> >>> sourceReference >> >>> return >> >>> <identity>... >> >>> >> >>> > Am I wrong, and would an additional value index help here? Or is my >> >>> > query >> >>> > just bad? >> >>> >> >>> You're computing every possible combiation of 5 items and then >> >>> filtering out the ones you want. >> >>> >> >>> Filtering out earlier would probably help. Also, moving the tests >> least >> >>> lilely to match to the outside would reduce the number of tests >> sooner. >> >>> >> >>> A value index might well help, but as Bridger wrote, check in the gUI >> >>> to see the query plan. BaseX might already be doing the sort of >> rewrite >> >>> i suggested. >> >>> >> >>> Liam >> >>> >> >>> >> >>> -- >> >>> Liam Quin, https://www.delightfulcomputing.com/ >> >>> Available for XML/Document/Information Architecture/XSLT/ >> >>> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. >> >>> Barefoot Web-slave, antique illustrations: >> http://www.fromoldbooks.org >> >>> >> >> >> > >> > >
BO
Bill Osmond22 Aug 2020 04:28 #
I'm beginning to think that perhaps my performance hopes were a bit too inflated, given the size and complexity of our database. After a fresh optimization, and with -Xms2g -Xmx10g, the following query takes 1492ms:
declare namespace ernm="http://ddex.net/xml/ern/411";
for $r in /ernm:NewReleaseMessage
  for $track_release in $r/ReleaseList/TrackRelease
    return
      <identity>
        <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
      </identity>
When I add a little bit more to the query, we go up to 11204ms:
declare namespace ernm="http://ddex.net/xml/ern/411";
for $r in /ernm:NewReleaseMessage
  let $parties := $r/PartyList/Party
  for $track_release in $r/ReleaseList/TrackRelease
    let $rlr := $track_release/ReleaseLabelReference/text()
    let $party := $parties[PartyReference/text() = $rlr]
    return
      <identity>
        <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
        <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
      </identity>
The fastest full query that I've been able to make so far takes 70450ms:
declare namespace ernm="http://ddex.net/xml/ern/411";
for $r in /ernm:NewReleaseMessage
  let $parties := $r/PartyList/Party
  let $sound_recordings := $r/ResourceList/SoundRecording
  let $releases := $r/ReleaseList/Release
  for $track_release in $r/ReleaseList/TrackRelease
    let $rrr := $track_release/ReleaseResourceReference/text()
    let $rlr := $track_release/ReleaseLabelReference/text()
    let $sound_recording := $sound_recordings[ResourceReference/text() =
$rrr]
    let $release :=
$releases[ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference/text()
= $rrr]
    let $party := $parties[PartyReference/text() = $rlr]
    return
      <identity>
        <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
        <artist>{ fn:string-join($sound_recording/DisplayArtistName/text(),
'/') }</artist>
        <title>{ $sound_recording/DisplayTitleText/text() }</title>
        <album>{ $release/DisplayTitleText/text() }</album>
        <icpn>{ $release/ReleaseId/ICPN/text() }</icpn>
        <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
      </identity>
Still, a significant improvement over where I started! Running this query against the actual remote server, and retrieving the full result set, is down to 3:52, from ~15 minutes. As this is a batch process that will run every hour, that performance is adequate. It does seem to be heavily CPU bound: when running any of these queries, there's always a single core sitting at 100% utilization while the rest of them are idle. Thanks for the help! Bill
LQ
Liam R. E. Quin22 Aug 2020 08:10 #
Quoted text · Bill Osmond · 7 lines
On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: > I'm beginning to think that perhaps my performance hopes were a bit > too > inflated, given the size and complexity of our database. After a > fresh > optimization, and with -Xms2g -Xmx10g, the following query takes > 1492ms:
[...] First note - there are in fact no loops in your query. Although "for" is used to introduce a loop in many procedural languages, it does nto do so in XQuery (nor does for-each in XSLT). In fact, it's closer to what SQL people know as a join. It's making a stream of n-tuples, and then evaluating the inner expression for each tuple, so that
for $a in (  'a', 'b', 'c')
  for $b in (1 to 5)
    return $a || '-' || $b
produces 15 lines of output, a-1, a-2, 1-3, a-4, a-6, b-1, and so on. You can see the BaseX query plan for your query already moves your where clauses as i did by hand, because BaseX is awesome. To make the query fast, you either need to reduce the number of tuples, and henve the number of times the expressions are evaluated, or you need to reduce the cost of creating the tuples. Moving the where clauses was my attempt to reduce the number of tuples. Adding an index might reduce the cost of making the tuples, so i'd certainly try that. If the input document is sorted, you might be able to construct something recursively (e.g. with fold-left) or use grouping or windowing to process $parties in groups, which may help considerably. Without seeing the data, that's only a guess. Liam
-- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
CG
Christian Grün22 Aug 2020 13:07 #
Hi Bill, Feel free to run the attached queries; maybe they give you a faster result. Your use case was interesting. It gave me some additional ideas on how to speed up queries (by reordering consecutive 'for' clauses that do not change the result). Cheers, Christian
Quoted text · Liam R. E. Quin · 53 lines
On Sat, Aug 22, 2020 at 6:10 AM Liam R. E. Quin <liam at fromoldbooks.org> wrote: > > On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: > > I'm beginning to think that perhaps my performance hopes were a bit > > too > > inflated, given the size and complexity of our database. After a > > fresh > > optimization, and with -Xms2g -Xmx10g, the following query takes > > 1492ms: > > [...] > > First note - there are in fact no loops in your query. Although "for" > is used to introduce a loop in many procedural languages, it does nto > do so in XQuery (nor does for-each in XSLT). > > In fact, it's closer to what SQL people know as a join. > > It's making a stream of n-tuples, and then evaluating the inner > expression for each tuple, so that > > for $a in ( 'a', 'b', 'c') > for $b in (1 to 5) > return $a || '-' || $b > > produces 15 lines of output, > a-1, a-2, 1-3, a-4, a-6, b-1, and so on. > > You can see the BaseX query plan for your query already moves your > where clauses as i did by hand, because BaseX is awesome. > > To make the query fast, you either need to reduce the number of tuples, > and henve the number of times the expressions are evaluated, or you > need to reduce the cost of creating the tuples. > > Moving the where clauses was my attempt to reduce the number of tuples. > Adding an index might reduce the cost of making the tuples, so i'd > certainly try that. > > If the input document is sorted, you might be able to construct > something recursively (e.g. with fold-left) or use grouping or > windowing to process $parties in groups, which may help considerably. > > Without seeing the data, that's only a guess. > > Liam > > -- > Liam Quin, https://www.delightfulcomputing.com/ > Available for XML/Document/Information Architecture/XSLT/ > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org >
CG
Christian Grünin reply to Bill Osmond, 22 Aug 2020, 18:3122 Aug 2020 16:41 #
That's good to hear. My rewritten query was based on the query of your first post, and I already guessed that all the nested loops are not really wanted or required. Looking forward to learning about your next insights, Christian
Quoted text · Bill Osmond · 93 lines
Bill Osmond <bill at with.in> schrieb am Sa., 22. Aug. 2020, 16:31: > Great e-mail messages to wake up to! Thank you for the further explanation > Liam, and Christian the examples you provided were considerably faster: > > - my fastest was 70k ms > - your ddex.xq was 35kms > - your ddex2.xq was 10kms! > > There is only one issue: both ddex.xq and ddex2.xq seem to return many > more results than expected (cartesian product somewhere perhaps) > > When I run the queries against a smaller database - one with just 6 of the > DDEX documents, my query returns 70 results which matches the number of > TrackReleases, but both ddex.xq and ddex2.xq return 303,134 results. It > looks like a separate "copy" of the output is being created for every Party > in the PartyList, when really there should be only one (specified by the > PartyReference). But this is very promising - if it takes 10 seconds to > return a massively expanded version of the data, then perhaps this will get > to <1000ms! > > On Sat, Aug 22, 2020 at 4:07 AM Christian Grün <christian.gruen at gmail.com> > wrote: > >> Hi Bill, >> >> Feel free to run the attached queries; maybe they give you a faster >> result. >> >> Your use case was interesting. It gave me some additional ideas on how >> to speed up queries (by reordering consecutive 'for' clauses that do >> not change the result). >> >> Cheers, >> Christian >> >> >> On Sat, Aug 22, 2020 at 6:10 AM Liam R. E. Quin <liam at fromoldbooks.org> >> wrote: >> > >> > On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: >> > > I'm beginning to think that perhaps my performance hopes were a bit >> > > too >> > > inflated, given the size and complexity of our database. After a >> > > fresh >> > > optimization, and with -Xms2g -Xmx10g, the following query takes >> > > 1492ms: >> > >> > [...] >> > >> > First note - there are in fact no loops in your query. Although "for" >> > is used to introduce a loop in many procedural languages, it does nto >> > do so in XQuery (nor does for-each in XSLT). >> > >> > In fact, it's closer to what SQL people know as a join. >> > >> > It's making a stream of n-tuples, and then evaluating the inner >> > expression for each tuple, so that >> > >> > for $a in ( 'a', 'b', 'c') >> > for $b in (1 to 5) >> > return $a || '-' || $b >> > >> > produces 15 lines of output, >> > a-1, a-2, 1-3, a-4, a-6, b-1, and so on. >> > >> > You can see the BaseX query plan for your query already moves your >> > where clauses as i did by hand, because BaseX is awesome. >> > >> > To make the query fast, you either need to reduce the number of tuples, >> > and henve the number of times the expressions are evaluated, or you >> > need to reduce the cost of creating the tuples. >> > >> > Moving the where clauses was my attempt to reduce the number of tuples. >> > Adding an index might reduce the cost of making the tuples, so i'd >> > certainly try that. >> > >> > If the input document is sorted, you might be able to construct >> > something recursively (e.g. with fold-left) or use grouping or >> > windowing to process $parties in groups, which may help considerably. >> > >> > Without seeing the data, that's only a guess. >> > >> > Liam >> > >> > -- >> > Liam Quin, https://www.delightfulcomputing.com/ >> > Available for XML/Document/Information Architecture/XSLT/ >> > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. >> > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org >> > >> > >
BO
Bill Osmondin reply to Christian Grün, 22 Aug 2020, 13:0722 Aug 2020 18:31 #
Great e-mail messages to wake up to! Thank you for the further explanation Liam, and Christian the examples you provided were considerably faster: - my fastest was 70k ms - your ddex.xq was 35kms - your ddex2.xq was 10kms! There is only one issue: both ddex.xq and ddex2.xq seem to return many more results than expected (cartesian product somewhere perhaps) When I run the queries against a smaller database - one with just 6 of the DDEX documents, my query returns 70 results which matches the number of TrackReleases, but both ddex.xq and ddex2.xq return 303,134 results. It looks like a separate "copy" of the output is being created for every Party in the PartyList, when really there should be only one (specified by the PartyReference). But this is very promising - if it takes 10 seconds to return a massively expanded version of the data, then perhaps this will get to <1000ms!
Quoted text · Christian Grün · 69 lines
On Sat, Aug 22, 2020 at 4:07 AM Christian Grün <christian.gruen at gmail.com> wrote: > Hi Bill, > > Feel free to run the attached queries; maybe they give you a faster result. > > Your use case was interesting. It gave me some additional ideas on how > to speed up queries (by reordering consecutive 'for' clauses that do > not change the result). > > Cheers, > Christian > > > On Sat, Aug 22, 2020 at 6:10 AM Liam R. E. Quin <liam at fromoldbooks.org> > wrote: > > > > On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: > > > I'm beginning to think that perhaps my performance hopes were a bit > > > too > > > inflated, given the size and complexity of our database. After a > > > fresh > > > optimization, and with -Xms2g -Xmx10g, the following query takes > > > 1492ms: > > > > [...] > > > > First note - there are in fact no loops in your query. Although "for" > > is used to introduce a loop in many procedural languages, it does nto > > do so in XQuery (nor does for-each in XSLT). > > > > In fact, it's closer to what SQL people know as a join. > > > > It's making a stream of n-tuples, and then evaluating the inner > > expression for each tuple, so that > > > > for $a in ( 'a', 'b', 'c') > > for $b in (1 to 5) > > return $a || '-' || $b > > > > produces 15 lines of output, > > a-1, a-2, 1-3, a-4, a-6, b-1, and so on. > > > > You can see the BaseX query plan for your query already moves your > > where clauses as i did by hand, because BaseX is awesome. > > > > To make the query fast, you either need to reduce the number of tuples, > > and henve the number of times the expressions are evaluated, or you > > need to reduce the cost of creating the tuples. > > > > Moving the where clauses was my attempt to reduce the number of tuples. > > Adding an index might reduce the cost of making the tuples, so i'd > > certainly try that. > > > > If the input document is sorted, you might be able to construct > > something recursively (e.g. with fold-left) or use grouping or > > windowing to process $parties in groups, which may help considerably. > > > > Without seeing the data, that's only a guess. > > > > Liam > > > > -- > > Liam Quin, https://www.delightfulcomputing.com/ > > Available for XML/Document/Information Architecture/XSLT/ > > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org > > >
CG
Christian Grünin reply to Bill Osmond, 22 Aug 2020, 20:4222 Aug 2020 18:58 #
Yes, I see now why my query returns much more hits than yours (including the first). As Liam already expressed, it’s not really a nested query what you are wanting to achieve. Oe thing you can always try is to change the order of your for clauses and see what happens. Maybe you did that already? In all cases, no index will be applied at the moments with these kinds of query patterns. I might get back to you later or tomorrow once I have another idea what could be done.
Quoted text · Bill Osmond · 35 lines
On Sat, Aug 22, 2020 at 6:42 PM Bill Osmond <bill at with.in> wrote: > > This is vexing - it seems as though the mechanism that provides the necessary "filtering" is the very thing that slows the execution down so much. This wouldn't have been obvious from the single example document I sent earlier, but each document stands alone: all of the searching and reference linking done for each TrackRelease in a NewReleaseMessage should only refer to other nodes in that same NewReleaseMessage. > > In my query, I started out with "for $r in /ernm:NewReleaseMessage" and I used $r on the right hand side of the subsequent for statements. It seems like without that, the execution is quick, but all the results from every document are getting matched to each other. With it, the results are correct, but the execution time shoots way up. In case any of you still have any patience for this question (and thanks again for everything so far!), I've attached a small sample set of 6 documents. The desired number of results from the query is 70 (which is the number of TrackReleases from all the documents combined), and the query that I've adapted from Christian's ddex2.xq which returns the right number of results is the following: > > declare namespace ernm = 'http://ddex.net/xml/ern/411'; > (: declare context item := db:open('ddex'); :) > > for $r in /ernm:NewReleaseMessage > > for $party in $r/PartyList/Party[ > PartyReference/text() = > $r/ReleaseList/TrackRelease/ReleaseLabelReference > ] > for $track_release in $r/ReleaseList/TrackRelease[ > ReleaseLabelReference/text() = > $r/PartyList/Party/PartyReference > ] > for $sound_recording in $r/ResourceList/SoundRecording[ > ResourceReference/text() = > $track_release/ReleaseResourceReference > ] > for $release in $r/ReleaseList/Release[ > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference/text() = > $track_release/ReleaseResourceReference > ] > return <identity> > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') }</artist> > <title>{ $sound_recording/DisplayTitleText/text() }</title> > <album>{ $release/DisplayTitleText/text() }</album> > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> > </identity>
BO
Bill Osmondin reply to Christian Grün, 22 Aug 2020, 16:4122 Aug 2020 20:42 #
This is vexing - it seems as though the mechanism that provides the necessary "filtering" is the very thing that slows the execution down so much. This wouldn't have been obvious from the single example document I sent earlier, but each document stands alone: all of the searching and reference linking done for each TrackRelease in a NewReleaseMessage should only refer to other nodes in that same NewReleaseMessage. In my query, I started out with "for $r in /ernm:NewReleaseMessage" and I used $r on the right hand side of the subsequent for statements. It seems like without that, the execution is quick, but all the results from every document are getting matched to each other. With it, the results are correct, but the execution time shoots way up. In case any of you still have any patience for this question (and thanks again for everything so far!), I've attached a small sample set of 6 documents. The desired number of results from the query is 70 (which is the number of TrackReleases from all the documents combined), and the query that I've adapted from Christian's ddex2.xq which returns the right number of results is the following:
declare namespace ernm = 'http://ddex.net/xml/ern/411';
(: declare context item := db:open('ddex'); :)

for $r in /ernm:NewReleaseMessage

for $party in $r/PartyList/Party[
  PartyReference/text() =
  $r/ReleaseList/TrackRelease/ReleaseLabelReference
]
for $track_release in $r/ReleaseList/TrackRelease[
  ReleaseLabelReference/text() =
  $r/PartyList/Party/PartyReference
]
for $sound_recording in $r/ResourceList/SoundRecording[
  ResourceReference/text() =
  $track_release/ReleaseResourceReference
]
for $release in $r/ReleaseList/Release[

ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference/text()
=
  $track_release/ReleaseResourceReference
]
return <identity>
  <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc>
  <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/')
}</artist>
  <title>{ $sound_recording/DisplayTitleText/text() }</title>
  <album>{ $release/DisplayTitleText/text() }</album>
  <icpn>{ $release/ReleaseId/ICPN/text() }</icpn>
  <sublabel>{ $party/PartyName/FullName/text() }</sublabel>
</identity>
Quoted text · Christian Grün · 107 lines
On Sat, Aug 22, 2020 at 7:42 AM Christian Grün <christian.gruen at gmail.com> wrote: > That's good to hear. My rewritten query was based on the query of your > first post, and I already guessed that all the nested loops are not really > wanted or required. > > Looking forward to learning about your next insights, > Christian > > > > Bill Osmond <bill at with.in> schrieb am Sa., 22. Aug. 2020, 16:31: > >> Great e-mail messages to wake up to! Thank you for the further >> explanation Liam, and Christian the examples you provided were considerably >> faster: >> >> - my fastest was 70k ms >> - your ddex.xq was 35kms >> - your ddex2.xq was 10kms! >> >> There is only one issue: both ddex.xq and ddex2.xq seem to return many >> more results than expected (cartesian product somewhere perhaps) >> >> When I run the queries against a smaller database - one with just 6 of >> the DDEX documents, my query returns 70 results which matches the number of >> TrackReleases, but both ddex.xq and ddex2.xq return 303,134 results. It >> looks like a separate "copy" of the output is being created for every Party >> in the PartyList, when really there should be only one (specified by the >> PartyReference). But this is very promising - if it takes 10 seconds to >> return a massively expanded version of the data, then perhaps this will get >> to <1000ms! >> >> On Sat, Aug 22, 2020 at 4:07 AM Christian Grün <christian.gruen at gmail.com> >> wrote: >> >>> Hi Bill, >>> >>> Feel free to run the attached queries; maybe they give you a faster >>> result. >>> >>> Your use case was interesting. It gave me some additional ideas on how >>> to speed up queries (by reordering consecutive 'for' clauses that do >>> not change the result). >>> >>> Cheers, >>> Christian >>> >>> >>> On Sat, Aug 22, 2020 at 6:10 AM Liam R. E. Quin <liam at fromoldbooks.org> >>> wrote: >>> > >>> > On Fri, 2020-08-21 at 17:28 -0700, Bill Osmond wrote: >>> > > I'm beginning to think that perhaps my performance hopes were a bit >>> > > too >>> > > inflated, given the size and complexity of our database. After a >>> > > fresh >>> > > optimization, and with -Xms2g -Xmx10g, the following query takes >>> > > 1492ms: >>> > >>> > [...] >>> > >>> > First note - there are in fact no loops in your query. Although "for" >>> > is used to introduce a loop in many procedural languages, it does nto >>> > do so in XQuery (nor does for-each in XSLT). >>> > >>> > In fact, it's closer to what SQL people know as a join. >>> > >>> > It's making a stream of n-tuples, and then evaluating the inner >>> > expression for each tuple, so that >>> > >>> > for $a in ( 'a', 'b', 'c') >>> > for $b in (1 to 5) >>> > return $a || '-' || $b >>> > >>> > produces 15 lines of output, >>> > a-1, a-2, 1-3, a-4, a-6, b-1, and so on. >>> > >>> > You can see the BaseX query plan for your query already moves your >>> > where clauses as i did by hand, because BaseX is awesome. >>> > >>> > To make the query fast, you either need to reduce the number of tuples, >>> > and henve the number of times the expressions are evaluated, or you >>> > need to reduce the cost of creating the tuples. >>> > >>> > Moving the where clauses was my attempt to reduce the number of tuples. >>> > Adding an index might reduce the cost of making the tuples, so i'd >>> > certainly try that. >>> > >>> > If the input document is sorted, you might be able to construct >>> > something recursively (e.g. with fold-left) or use grouping or >>> > windowing to process $parties in groups, which may help considerably. >>> > >>> > Without seeing the data, that's only a guess. >>> > >>> > Liam >>> > >>> > -- >>> > Liam Quin, https://www.delightfulcomputing.com/ >>> > Available for XML/Document/Information Architecture/XSLT/ >>> > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. >>> > Barefoot Web-slave, antique illustrations: >>> http://www.fromoldbooks.org >>> > >>> >> >>
BO
Bill Osmondin reply to Christian Grün, 22 Aug 2020, 18:5824 Aug 2020 01:05 #
Indeed I have, with no positive results unfortunately. I'm now testing to see if having multiple return statements (as in Liam's queries) helps, although the results so far are basically the same.
Quoted text · Christian Grün · 67 lines
On Sat, Aug 22, 2020 at 9:59 AM Christian Grün <christian.gruen at gmail.com> wrote: > Yes, I see now why my query returns much more hits than yours > (including the first). As Liam already expressed, it’s not really a > nested query what you are wanting to achieve. > > Oe thing you can always try is to change the order of your for clauses > and see what happens. Maybe you did that already? In all cases, no > index will be applied at the moments with these kinds of query > patterns. I might get back to you later or tomorrow once I have > another idea what could be done. > > > On Sat, Aug 22, 2020 at 6:42 PM Bill Osmond <bill at with.in> wrote: > > > > This is vexing - it seems as though the mechanism that provides the > necessary "filtering" is the very thing that slows the execution down so > much. This wouldn't have been obvious from the single example document I > sent earlier, but each document stands alone: all of the searching and > reference linking done for each TrackRelease in a NewReleaseMessage should > only refer to other nodes in that same NewReleaseMessage. > > > > In my query, I started out with "for $r in /ernm:NewReleaseMessage" and > I used $r on the right hand side of the subsequent for statements. It seems > like without that, the execution is quick, but all the results from every > document are getting matched to each other. With it, the results are > correct, but the execution time shoots way up. In case any of you still > have any patience for this question (and thanks again for everything so > far!), I've attached a small sample set of 6 documents. The desired number > of results from the query is 70 (which is the number of TrackReleases from > all the documents combined), and the query that I've adapted from > Christian's ddex2.xq which returns the right number of results is the > following: > > > > declare namespace ernm = 'http://ddex.net/xml/ern/411'; > > (: declare context item := db:open('ddex'); :) > > > > for $r in /ernm:NewReleaseMessage > > > > for $party in $r/PartyList/Party[ > > PartyReference/text() = > > $r/ReleaseList/TrackRelease/ReleaseLabelReference > > ] > > for $track_release in $r/ReleaseList/TrackRelease[ > > ReleaseLabelReference/text() = > > $r/PartyList/Party/PartyReference > > ] > > for $sound_recording in $r/ResourceList/SoundRecording[ > > ResourceReference/text() = > > $track_release/ReleaseResourceReference > > ] > > for $release in $r/ReleaseList/Release[ > > > ResourceGroup/ResourceGroup/ResourceGroupContentItem/ReleaseResourceReference/text() > = > > $track_release/ReleaseResourceReference > > ] > > return <identity> > > <isrc>{ $track_release/ReleaseId/ISRC/text() }</isrc> > > <artist>{ fn:string-join($sound_recording/DisplayArtistName, '/') > }</artist> > > <title>{ $sound_recording/DisplayTitleText/text() }</title> > > <album>{ $release/DisplayTitleText/text() }</album> > > <icpn>{ $release/ReleaseId/ICPN/text() }</icpn> > > <sublabel>{ $party/PartyName/FullName/text() }</sublabel> > > </identity> >
-- <http://www.with.in> *William Osmond* Manager, System Operations & IT 3760 Motor Ave, Los Angeles, CA 90034 310-853-8737 | www.with.in
LQ
Liam R. E. Quin24 Aug 2020 04:44 #
Quoted text · Bill Osmond · 6 lines
On Sun, 2020-08-23 at 14:05 -0700, Bill Osmond wrote: > Indeed I have, with no positive results unfortunately. I'm now > testing to > see if having multiple return statements (as in Liam's queries) > helps, > although the results so far are basically the same.
I tried to make clear what was going on, using explit returns, The syntax of a FLWOR expression allows either form: for $sock in /drawer/socks, $shoe in /tray/shoes is the same as for $sock in /drawer/socks for $shoe in /tray/shoes and constructs every possible (sock, shoe) pair.
However,
  for $sock in /drawer/socks
  return
    for $shoe in /tray/shoes
    return
       some_expression($sock, $shoe)
maybe makes clearer that some_exoression() will be called
count(/drawer/socks) * count(/tray/shoes) times.
the way to speed this up is likely to construct many fewer tuples, using grouping or windowing to process the inner part of your query. Liam
-- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org

⚡Generated with XQuery