Hi Michael,

Thanks a lot for your help!!!
I changed my query to: 

String query = String.format("MATCH (a:LABEL { name:%d }) -[*0..%d]-(x) 
RETURN distinct x", Integer.parseInt(nodeName), range); 

And it works perfectly!

My range values are 1-6, I don't require a larger range.
For range 6 on a central node I got result after 2 hours,
on a less busy node I got a result after few seconds.

Nice job catching my node name type mismatch,
I changed it in the building script and forgot to change it in my code.
You saved me a couple of debug hours :)   


On Monday, November 10, 2014 12:13:29 AM UTC+2, Michael Shapiro wrote:
>
> I have built a DB using this batch script 
> <http://jexp.de/blog/2014/10/flexible-neo4j-batch-import-with-groovy/>
> My DB contains about 53 millions node and about 90 millions relationships.
> I want to perform a query to find all the neighbors of a certain node. So 
> I'm using the following query (connect to the DB engine with JAVA):
>
> String query = String.format("MATCH (a { name: '%s' }) -[*0..%d]-(x) 
> RETURN x", nodeName, range); 
>
>
> The query completes very fast, but when I try to read the result using 
> the "*IteratorUtil*" class, whatever function I call 
> (count, asIterable, first..) the program stops responding.
>
> I'm using the following configuration for the JVM:
>
> *-Xms512m*
> *-Xmx2g*
> *-XX:-UseGCOverheadLimit*
> *-XX:MaxPermSize=512m*
> *-XX:+UseConcMarkSweepGC *
>
>
> My code:
>
> Transaction tx = mGraphDB.beginTx();
> try
> { 
>    String query = String.format("MATCH (a { name: '%s' }) -[*0..%d]-(x) 
> RETURN x", nodeName, range);   
>    result = mDBEngine.execute( query ); 
>    Iterator<Node> n_column = result.columnAs( "x" ); for ( Node node : 
> IteratorUtil.asIterable( n_column ) )
>    { 
>        res.nodesIDList.add(i, (Integer)node.getProperty(name));
>    } 
>    tx.success(); 
>   ...
> }
> catch (Exception e) 
> {
>   tx.failure();
>   ...
> } 
> finally
> {
>   tx.close(); 
> } 
>
>
> Any idea on how to fix this?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to