[MarkLogic Dev General] Query performance: getting all documents in
a collection
Mattio Valentino
mattio.valentino at gmail.com
Thu Aug 23 06:55:45 PDT 2007
Hi all,
I'm stumped by a relatively simple query that's performing very
poorly. I'm assuming there's an index I can enable to help, but
before I mess with those settings I thought I'd see if there was
something else I should tweak.
Here's the query:
for $i in cts:search(//book, cts:collection-query('testcol'))
return
<result id=" { $i/@local-id } " />
I'm trying to return what will eventually be a title list. The root
node of all the documents in the collection is "book" and I'd like to
return them all. There are only 150 documents now, but there will be
around 300. The query is taking about 20 seconds to run and utilizes
about 30% of the CPU.
What can I do to improve this query?
Thanks,
Mattio
More information about the General
mailing list