[xquery-talk] XML Databases that support "Dynamic" XQuery

Kelly Stirman Kelly.Stirman at marklogic.com
Sat Feb 26 12:26:16 PST 2011

The concept of "dynamic" and "persistent" are at odds with one another. For any indexing mechanism, the definition need be known a priori.

In MarkLogic, and possibly in other XQuery implementations, you can pass a sequence of URI's to the fn:doc function. I believe this is similar to what you are looking for.

Also, in MarkLogic, you have a function called cts:document-uris, which also takes a sequence, and allows you to add document-uri's as a sub-query to any other query. You can pass in many values, with a rule of thumb being around a million URI's per second of query resolution time. This function is best used with the document uri lexicon enabled for the database, which adds very modest overhead to memory utilization, and does not substantially affect update speed.

Another option in MarkLogic is to use registered queries. A registered query takes the output of a query and persists its membership in the indexes. For example, a complex query with hundreds of sub-queries organized with Booleans might take longer than you wish without a registered query (i.e., hundreds of milliseconds). You can register the query, and subsequent requests will be vastly more efficient. Registered queries do reflect the latest transactions - if you update documents that match the registered query, they will be accurately returned by queries that use the registered query.


Message: 1
Date: Sat, 26 Feb 2011 12:23:19 +0100
From: Adam Retter <adam.retter at googlemail.com>
Subject: Re: [xquery-talk] XML Databases that support "Dynamic" XQuery
To: "Wood, Jamey" <Jamey.Wood at nrel.gov>
Cc: "talk at x-query.com" <talk at x-query.com>
	<AANLkTi=OjgteJ_05D5V7ki337HpEFuAU+YK45YvdZxiE at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

FYI on the roadmap of eXist-db is the facility to virtualise collections.
This would meet your requirements, but its not ready today I'm afraid.
On 25 Feb 2011 19:55, "Wood, Jamey" <Jamey.Wood at nrel.gov> wrote:
> Are there any XML Databases (or even just XQuery engines that use some
kind of persistent optimized indexing scheme) that provide some way to
define "dynamic" collections? In other words, I'm looking for something
similar to how Saxon implements collections:
> http://www.saxonica.com/documentation/sourcedocs/collections.xml
> ???where:
> * Any given document could belong to multiple different collections
> * A collection's membership might itself be produced by a query or other
dynamic mechanism
> Sorry if that isn't the right terminology for what I'm seeking. From what
I've read and seen, Saxon's approach to collections could meet these needs.
But its general performance will be hindered by not having some kind of
persistent indexing mechanism for the underlying XML documents (as is done
in systems like eXist and MonetDB). Is that correct?
> Thanks,
> Jamey
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk

More information about the talk mailing list