Hi Christian,
> * Console:
> open tuscreen
> xquery //*:molecule[@*:id="11178"]
Wow, thank you. That gave a huge boost in performance:
for $i in
//*:molecule[@*:id="298038"]/*:identifier[@*:convention="iupac:smile"]
return
<smile>{$i/@value}</smile>
Takes 80ms now.
But unfortunately it doesn't work for a query like:
let $ids := (1 to 10)
for $i in //*:molecule[@*:id =
$ids]/*:identifier[@*:convention="iupac:smile"]
return
<smile>{$i/@value}</smile>
Query executed in 3688.12 ms.
So it still takes >3500 ms
The Query execution plan is quite different I noticed:
First Query: Result: element { "smiles" } { for $i in
IndexAccess("298038",
ATV)/self::*:id/parent::*:molecule/*:identifier[@*:convention =
"iupac:smile"] return element { "smile" } { $i/@value } }
Second Query: Result: for $i in IndexAccess("iupac:smile",
ATV)/self::*:convention/parent::*:identifier[parent::*:molecule[@*:id =
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)]] return element { "smile" } { $i/@value }
So the second plan doesn't make use of the attribute index for locating
the id-attributes.
> Sorry, zu spät gesehen… Jederzeit ;) Je mehr Mails allerdings an die
> Liste gehen, desto besser; dann bleiben auch die anderen auf dem
> Laufenden.
Dann antworte ich besser an die Liste ;)
Patrick