What does "No Value" means? leaving off the property restriction altogether?
What do you want to achieve with that global query then?

Then Neo4j has to scan over all nodes with that label, if you have two labels 
on both sides, you can force to Neo4j to start the scan at the side with the 
fewer entries,
by USING SCAN ON (nodeItem:labelItem), see: 
http://docs.neo4j.org/chunked/milestone/query-using.html#using-hinting-a-label-scan

Otherwise as soon as you have an index or constraint on a :Label(property) pair 
cypher will use that index.

The performance of directions for relationships is only dependent on the 
numbers of rels that are returned (and how randomly they were created in the 
first place (i.e. when they have to be loaded from disk)
What version do you use?

Michael

Am 16.07.2014 um 10:43 schrieb Alex winter <[email protected]>:

> Hi all.
> I created the database neo4j. When I imported the data to neo4j, I always 
> create relationship without direction between Item and Values.
> I want to find every items has value ("some value"): cypher query like this:
> Match (nodeItem:labelItem)-->(nodeValue:labelValues{property:"Some Value"}) 
> return nodeItem.
> The performance is very fast and return around 250 rows
> 
> But when I run the query with  nodeValue: with property "No Value", it takes 
> long time and can't finish after thirty minutes. I think that when I did this 
> query, neo4j looks like full scan every node in the label Values. As I 
> estimated, there are around thousand of nodeItem satisfy the condition of 
> query. But it is doesn't matter in principle.
> 
> As I read in neo4j documents, we don't need create bidirection of 
> relationship between two nodes. So I think that I did sth in wrong way.
> 
> But normally, when I use the tool from neo4j: (for example: 
> http://localhost:7474/db/data/node/1950) and use the function all/in/out from 
> the node,  I found that out direction faster than in direction.
> 
> Do you have any recommendation, and notice about config of server or design 
> database to improve the performance of query to find all node has a 
> relationship to one specify node. 
> 
> Thanks
> 
> 
> 
> -- 
> 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.

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