[bdbxml] Indexing attributes
Peter Hickman <[email protected]>
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
I have a simple database and most of the queries have the following
structure, locate some element by it's id attribute and sort the child
elements by the their number attribute.
query '
<div class="paragraphlist">
{
for $paragraph in
collection("books.dbxml")/collection/book/chapter[@id =
"b4.2.4"]/paragraph order by $paragraph/@number cast as xs:decimal
return $paragraph
}
</div>
'
I have tried adding indexes to speed things up. An unindexed query took
around 5.4 seconds, whatever indexes I add only make things worse,
adding on average another second to the query.
In this situation is it possible to speed things up with an index?
------------------------------------------
To remove yourself from this list, send an
email to [email protected]