Actually, I think I spoke too soon.

 

This test:

return (db:option('attrindex'),

      for $node in $map

      return prof:track(db:open($rkDatabase)/doc-where-used-index/where-used-entry/@key[xs:integer(.) eq 9151416])?time ! util:formatTime(.)

 

Returns:

 

true

00.030 seconds

 

Where my current database context is the database named in $rkDatabase.

 

A small improvement (0.036 to 0.030) but not dramatic.

 

So I think I’m still missing some detail, probably a configuration issue.

 

Cheers,

 

E,

_____________________________________________

Eliot Kimber

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com

LinkedIn | Twitter | YouTube | Facebook

 

From: Eliot Kimber <eliot.kimber@servicenow.com>
Date: Friday, July 15, 2022 at 3:39 PM
To: Liam R. E. Quin <liam@fromoldbooks.org>, basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] Possible to Speed Up This Lookup?

Yes, turning on the attribute index definitely improves performa nce dramatically, which is no surprise. Not sure how I missed the need to expressly turn on these indexes. Doing that now.

 

Cheers,

 

E.

 

_____________________________________________

Eliot Kimber

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com

LinkedIn | Twitter | YouTube | Facebook

 

From: Eliot Kimber <eliot.kimber@servicenow.com>
Date: Friday, July 15, 2022 at 3:01 PM
To: Liam R. E. Quin <liam@fromoldbooks.org>, basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] Possible to Speed Up This Lookup?

There are on the order of 50K index entry items.

 

I think the attribute index is probably the answer—for some reason I assumed that would be indexed by default but I see that it is not looking at the database details.

 

I’ll try enabling the index and see what happens.

 

Cheers,

 

E.

 

_____________________________________________

Eliot Kimber

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com

LinkedIn | Twitter | YouTube | Facebook

 

From: Liam R. E. Quin <liam@fromoldbooks.org>
Date: Friday, July 15, 2022 at 1:22 PM
To: Eliot Kimber <eliot.kimber@servicenow.com>, basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] Possible to Speed Up This Lookup?

[External Email]


On Fri, 2022-07-15 at 18:04 +0000, Eliot Kimber wrote:
>  collection($rkDatabase)/doc-where-used-index/where-used-
> entry[string(@key) eq string(db:node-id($node))]
>
> Where the markup is shown in [1] below.
>
> Using prof:track() I’m measuring a consistent 0.036 seconds per
> lookup,

could it be opening the collection that takes time? Or are there
hundreds of thousands of where-used-entry elements, and, if so, do you
have an attribute value index?

--
Liam Quin,
https://urldefense.com/v3/__https://www.delightfulcomputing.com/__;!!N4vogdjhuJM!C1fj636Ib2y0kENz2AwiUJZj6IyBT5mrb5YE_kSoMeqI0fFs95OpyWpldUalcS47Lg7Dt-1d0gNC7xyQXLy9rZQ$
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: 
https://urldefense.com/v3/__http://www.fromoldbooks.org__;!!N4vogdjhuJM!C1fj636Ib2y0kENz2AwiUJZj6IyBT5mrb5YE_kSoMeqI0fFs95OpyWpldUalcS47Lg7Dt-1d0gNC7xyQWGj0qnM$