Hello, In the 2.1.1 version, when we do the following cypher it takes a 
long time (more than a minute).  When we do the same query using a "With" 
clause, it takes about 6 seconds.  We need to get this down to less than a 
second.  We think it is slow because all the nodes "a" and "c" are loaded 
in memory before filtering is done using the "where" clause.  Is there 
anyway to force Neo to use the indexes on the "name" property to select 
only the nodes in the where clause.  We tried USING HINTS but it looks the 
IN clause is not supported for hints.

Cyoher that takes more than a minute
match (a:newtags)-[:belongs_to]-(b)-[:belongs_to]-(c:newtags) 
where a.name IN 
["1225","10091","1921056","11962","1921078","1920809","1921090"] 
and c.name IN ["5226","1955"]
return count(distinct(b));

Cypher using WITH clause takes about 6 seconds  
match (a:newtags) where a.name IN 
["1225","10091","1921056","11962","1921078","1920809","1921090"] 
with a
match (a)-[rm1]-(b)-[rm2]-(c:newtags) 
where c.name IN ["5226","1955"]
return (count(distinct(b))

Some stats: 
The machine has about 2.2 milion nodes.  We are using AWS with 7.5 GB RAM.

Any help will be appreciated.

Thank you.

Raj

-- 
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