From: <Lar...@ie...> - 2011-01-31 17:46:24
|
Hi Leif-Jöran, the question from 2010-12-20 is solved. I sent Wolfgang some XML-Data and he adviced me to use the new eXist 1.5 because also an optimised query was processed to slow with eXist 1.4 In this mail I refer to an an other query which seems to be not optimal cause the eXist-Log has > TRACE (Optimize.java [getQNameIndexType]:291) - Cannot optimize: collection /db/loewe-a3/tocs/layers/txsf_u8 does not define an index on start > TRACE (Optimize.java [eval]:169) - exist:optimize: Cannot optimize expression. and the Query is processed way to slow, compared to the Saxon-Processor. Thanks for your help LOK --- Ursprüngliche Nachricht --- Datum: 31.01.2011 16:49 Von: Leif-Jöran Olsson <lj...@ex...> An: Lars-Olof Krause <Lar...@ie...> Betreff: Re: [Exist-development] Index Configuration // Performance Issue > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dear Lars-Olof, I think the majority of the questions originating from > your 2010-12-20 letter on the subject of Performance problem are still > without answer from you. I have not seen any xml snippet so I suspect > you only sent it to Wolfgang? > > Cheers, > Leif-Jöran > > Den 2011-01-31 15:50, Lars-Olof Krause skrev: > > Hi, > > > > I write the the development-list cause I got no answer from the > > open-list and the question is somehow related to the development cause > > it deals with performance issues. > > > > I got an quite complex xQuery which processes the whole collection > > using an Saxon-Processor in several seconds. > > Using my eXist1.5 the process of one Dokument takes way longer than the > > processing of the whole collection using the saxon-processor. > > > > Since my eXist-Log shows > > TRACE (Optimize.java [getQNameIndexType]:291) - Cannot optimize: > > collection /db/loewe-a3/tocs/layers/txsf_u8 does not define an index on > > start > > TRACE (Optimize.java [eval]:169) - exist:optimize: Cannot optimize > > expression. > > > > Something has to be wrong with my indexes. > > > > Can someone tell me which indexes I should configure for the following > > xquery-script or which changes I could do to improve the > > script-performance? > > > > Thanks so much. > > > > LOK > > > > xQuery: > > ---------------------------------------- > > xquery version "1.0"; > > > > declare boundary-space strip; > > > > declare namespace xsf="http://www.xstandoff.net/2009/xstandoff/1.1"; > > declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; > > declare namespace tocs="http://taurus.zmi.uni-giessen.de/tocs"; > > declare namespace terms="http://taurus.zmi.uni-giessen.de/terms"; > > declare namespace cnxde="http://www.text-technology.de/cnxde"; > > declare namespace my="http://www.taurus.zmi.uni-giessen.de/my"; > > declare default element namespace > > "http://www.xstandoff.net/2009/xstandoff/1.1"; > > > > declare function my:primdata($node as node(), $start as xs:integer, > > $end as xs:integer) as xs:string { > > substring($node, $start + 1 , $end - $start) > > }; > > > > declare function my:term2lemmaRep($termSegment as node(), $d as node()) > > as xs:string { > > let $token := $d//cnxde:token[./id(@xsf:segment)/@start+0 ge > > $termSegment/@start+0][./id(@xsf:segment)/@end+0 le > > $termSegment/@end+0] > > return string(($token[1]/@lemma)) > > }; > > > > <result-document> > > { > > let $doc := > > doc("loewe-a3/tocs/layers/txsf_u8/raithel_paedagogik_2007-txsf.xml") > > let $text := $doc//xsf:textualContent > > > > return > > for $child in $doc//tocs:label > > > > let $childSegment := $child/id(@xsf:segment) > > let $childRange := my:primdata($text, $childSegment/@start, > > $childSegment/@end) > > > > let $childTerm := ($doc//terms:term/id(@xsf:segment)[@start+0 > > ge $childSegment/@start+0][@end+0 le $childSegment/@end+0])[1] > > > > where $childTerm > > return > > let $childTermRange := my:primdata($text, $childTerm/@start, > > $childTerm/@end) > > let $childTermLemmaRep := my:term2lemmaRep($childTerm,$doc) > > > > let $self := > > $child/../../../preceding-sibling::tocs:item[1]/tocs:label[1] > > > > let $selfSegment := $self/id(@xsf:segment) > > let $selfRange := my:primdata($text, $selfSegment/@start, > > $selfSegment/@end) > > > > where $self and ( contains($selfRange, "Disziplinen") or > > contains($selfRange, "Subdisziplinen") or > > contains($selfRange, "Fachrichtungen") or > > contains($selfRange, "Hauptrichtungen") or > > contains($selfRange, "gebiete") or > > contains($selfRange, "fächer") or > > contains($selfRange, "Bereiche") or > > contains($selfRange, "Zweige") ) > > > > > > return > > let $parent := > > $self/../../../preceding-sibling::tocs:item[1]/tocs:label[1] > > let $parentSegment := $parent/id(@xsf:segment) > > let $parentRange := my:primdata($text, $parentSegment/@start, > > $parentSegment/@end) > > > > let $parentTerm := ($doc//terms:term/id(@xsf:segment)[@start ge > > $parentSegment/@start][@end le $parentSegment/@end])[1] > > > > where $parentTerm > > return > > let $parentTermRange := my:primdata($text, $parentTerm/@start, > > $parentTerm/@end) > > let $termLemmaRep := my:term2lemmaRep($parentTerm, $doc) > > return > > <construction> > > <parent> > > <label>{$parentRange}</label> > > <term>{$parentTermRange}</term> > > <termLemmaRep>{$termLemmaRep}</termLemmaRep> > > > > </parent> > > <self> > > <label>{$selfRange}</label> > > </self> > > <child> > > <label>{$childRange}</label> > > <term>{$childTermRange}</term> > > <termLemmaRep>{$childTermLemmaRep}</termLemmaRep> > > </child> > > </construction> > > } > > </result-document> > > > > > > ------------------------------------------------------------------------------ > > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > > Finally, a world-class log management solution at an even better price-free! > > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > > February 28th, so secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsight-sfd2d > > _______________________________________________ > > Exist-development mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-development > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.16 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ > > iD8DBQFNRtn7hcIn5aVXOPIRAuG1AJ93y+rvVIH8AsZdJDlFf6+gGdqjxQCgsUgr > 64BjQZkxg2jaq8jmKIgZxww= > =kjxn > -----END PGP SIGNATURE----- > |