No, it doesn't. Only the execution of the query itself.

There is definitely something else going on. This situation only arises when I run the application in debug mode. If I step through the code it hangs about one minute at the moment I execute the line (in Eclipse)

        ResourceSet result = queryService.query(query);

Personally I would be very interested to know how this possibly can happen. Does someone has an explanation?

Kind regards,




"Adam Retter" <adam@exist-db.org>

29-07-2008 14:06

To
"Rudolf de Grijs" <rdegrijs@epo.org>
cc
eXist <exist-open@lists.sourceforge.net>
Subject
Re: [Exist-open] query takes more than one minute ...





Does that > 1 minute include the time to start up the database?


2008/7/29 Rudolf de Grijs <rdegrijs@epo.org>:
>
> At the moment I'm using eXist 1.1.1 as an embedded database.
>
> When I try to execute the following xquery it takes more than a minute to
> execute:
>
> declare namespace cl = "
http://www.epo.org/namespaces/epodos/clause/v1.0/";
>
> for $category in collection('/db/clause')/cl:clause-category
> return <cl:clause-category
> xmlns:cl="
http://www.epo.org/namespaces/epodos/clause/v1.0/"> {
> attribute noOfClauses
> {
> count(for $clause in collection('/db/clause')/cl:clause
> let $categoryref := $clause/cl:clause-categories/cl:ref-category/@ref-id
> where $categoryref = $category/@category-id
> return $clause/@clause-id)
> } ,
> $category/@*, $category/* }
> </cl:clause-category>
>
>
> I have defined a range index for all queried paths.
>
> If I perform the same query using xquery exist client it only takes 2
> seconds.
>
> I'm using the following code (excerpt) to perform the query
>
>                         existCollection = getCollection(path);
>                         XQueryService queryService = (XQueryService)
> existCollection.getService("XQueryService", "1.0");
>                         queryService.setProperty(OutputKeys.INDENT,
> (this.connnection.isIndentOutput() ? "yes" : "no"));
>                         queryService.setProperty(OutputKeys.ENCODING,
> "UTF-8");
>                         ResourceSet result = queryService.query(query); //
> this takes more than a minute ???
>
>
> The result BTW is correct.
>
> Kind regards,
> Rudolf
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
>
http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Exist-open mailing list
> Exist-open@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/exist-open
>
>



--
Adam Retter

eXist Developer
{ England }
adam@exist-db.org
irc://irc.freenode.net/existdb