When does the query actually get executed? This is my code:
     try
     {
        qr = query.execute();
        entiter = qr.getNodes();
     }
     catch (Exception e)
     {
        logger.error("Executing entity query", e);
     }

These two statements are done quite quickly. And when I inspect the entiter
variable, it shows 2000 nodes.

It's when I do either an entiter.hasNext() or an entiter.nextNode() that the
problem occurs. Will your suggestions of config tweaks help here?

On 2/5/07, Marcel Reutegger <[EMAIL PROTECTED]> wrote:

Sridhar Raman wrote:
> I am executing an XPATH query. And I get the NodeIterator iter from the
> QueryResult.getNodes(). This iter is the one causing the problem.

Then I'd assume it's the query that takes a long time to execute.

You can try the following configuration tweaks:

- disable document order on the query result
   See: http://issues.apache.org/jira/browse/JCR-145
- set the paramter 'resultFetchSize' to a lower value if
   you don't need all 2000 nodes, but are only interested
   in the first few. please note however, that there are
   security concerns with this option:
   http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/10103

> Could you tell me what I need to do to get a thread dump from a java
> process?

on unix:

kill -QUIT <java-process-id>

on windows:

Ctrl-Break in the console where you started the java process

The thread dump is sent to the standard out of the java process.

regards
  marcel

Reply via email to