Hi,
I am observing a performance loss between BaseX versions 9.2.4 (which I was using so far) and 9.3.2 (to which I updated recently) when executing an xQuery like this:
--- (: Open 2 databases and get all <record>s :) let $recsFromDb1 := db:open('db1')/record let $recsFromDb2 := db:open('db2')/record
(: Get distinct IDs of all records in db1 :) let $idsFromRecsInDb1 := distinct-values($recsFromDb1/exampletag[@exampleattr='id'])
(: Iterate over the distinct IDs of db1 and return the records from db2 with the same ID :) for $id in $idsFromRecsInDb1 let $recFromDb2WithSameId := $recsFromDb2[exampletag[@exampleattr='id']=$id] return $recFromDb2WithSameId ---
In BaseX version 9.2.4 the query executes very fast (2 - 3 seconds). In 9.3.2 I didn't wait to the end ... I aborted after several minutes because I suspected that something must be wrong.
Both BaseX instances have allocated the same amount of memory (4096MB). The databases (db1 and db2) were created in the respective BaseX version from scratch and contain attribute and text indexes. They were optimized before executing the query mentioned above. All options and preferences are the same in both BaseX instances. I am using the GUI in Ubuntu 18.04.
Here are some more details about the two databases:
db1: - Size: 2255MB - Nodes: 97598775 - Documents: 7489 - Uptodate: true
db2: - Size: 883MB - Nodes: 46317512 - Documents: 1 - Uptodate: true
Does someone have an idea why there is such a difference in performance between the two BaseX versions?
Thanks for any answers and hints!
Best regards, Michael
Mag. Michael Birkner AK Wien - Bibliothek 1040, Prinz Eugen Straße 20-22 T: +43 1 501 65 12455 F: +43 1 501 65 142455 M: +43 664 88957669
michael.birkner@akwien.atmailto:Michael.BIRKNER@akwien.at wien.arbeiterkammer.athttp://wien.arbeiterkammer.at/
Besuchen Sie uns auch auf: facebookhttp://www.facebook.com/arbeiterkammer/ | twitterhttps://twitter.com/Arbeiterkammer | youtubehttps://www.youtube.com/user/AKoesterreich -------------------------------------------------- Die AK setzt sich seit 100 Jahren für Gerechtigkeit ein. Damals. Heute. Für immer.
arbeiterkammer.at/100https://arbeiterkammer.at/100https://arbeiterkammer.at/100https://w.ak.at/zukunftsprogramm [https://wien.arbeiterkammer.at/ak100_maildisclaimer.png]https://arbeiterkammer.at/100 Beachten Sie, dass Sie uns ab sofort unter einer geänderten Rufnummer erreichen. Bitte speichern Sie gleich Ihren Kontakt zur AK Wien ein unter 501 65 1, gefolgt von der gewohnten Durchwahl. Dieses Mail ist ausschließlich für die Verwendung durch die/den darin genannten AdressatInnen bestimmt und kann vertrauliche bzw rechtlich geschützte Informationen enthalten, deren Verwendung ohne Genehmigung durch den/ die AbsenderIn rechtswidrig sein kann. Falls Sie dieses Mail irrtümlich erhalten haben, informieren Sie uns bitte und löschen Sie die Nachricht. UID: ATU 16209706 I https://wien.arbeiterkammer.at/datenschutz